update balance for pinned contract

pull/4707/head
aniket-engg 8 months ago committed by Aniket
parent 32cd1e7cc5
commit 38f9520bb4
  1. 5
      libs/remix-ui/run-tab/src/lib/actions/deploy.ts

@ -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

Loading…
Cancel
Save