Skip to content

Commit

Permalink
update balance for pinned contract
Browse files Browse the repository at this point in the history
  • Loading branch information
Aniket-Engg committed Apr 10, 2024
1 parent 32cd1e7 commit f84cd07
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libs/remix-ui/run-tab/src/lib/actions/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f84cd07

Please sign in to comment.