|
|
|
@ -339,8 +339,9 @@ export const getFuncABIInputs = (plugin: RunTab, funcABI: FuncABI) => { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export const updateInstanceBalance = async (plugin: RunTab, dispatch: React.Dispatch<any>) => { |
|
|
|
|
if (plugin.REACT_API?.instances?.instanceList?.length) { |
|
|
|
|
const instances = plugin.REACT_API?.instances?.instanceList |
|
|
|
|
if (plugin.REACT_API?.instances?.instanceList?.length || plugin.REACT_API?.pinnedInstances?.instanceList?.length) { |
|
|
|
|
let instances = plugin.REACT_API?.instances?.instanceList?.length ? plugin.REACT_API?.instances?.instanceList : [] |
|
|
|
|
instances = plugin.REACT_API?.pinnedInstances?.instanceList.length ? instances.concat(plugin.REACT_API.pinnedInstances.instanceList) : instances |
|
|
|
|
for (const instance of instances) { |
|
|
|
|
const balInEth = await plugin.blockchain.getBalanceInEther(instance.address) |
|
|
|
|
instance.balance = balInEth |
|
|
|
|