fix bug where proposal sometimes doesnt load (#602)

This commit is contained in:
Daniel Chew 2023-02-15 22:52:30 +09:00 committed by GitHub
parent aba0390495
commit 950d65746f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -102,13 +102,15 @@ export const useMultisig = (wallet: Wallet): MultisigHookData => {
) )
) )
try { try {
if (cancelled) return
// DELETE THIS TRY CATCH ONCE THIS MULTISIG EXISTS EVERYWHERE // DELETE THIS TRY CATCH ONCE THIS MULTISIG EXISTS EVERYWHERE
setpriceFeedMultisigAccount( setpriceFeedMultisigAccount(
await squads.getMultisig( await squads.getMultisig(
PRICE_FEED_MULTISIG[getMultisigCluster(cluster)] PRICE_FEED_MULTISIG[getMultisigCluster(cluster)]
) )
) )
} catch { } catch (e) {
console.error(e)
setpriceFeedMultisigAccount(undefined) setpriceFeedMultisigAccount(undefined)
} }
@ -120,6 +122,7 @@ export const useMultisig = (wallet: Wallet): MultisigHookData => {
) )
) )
try { try {
if (cancelled) return
// DELETE THIS TRY CATCH ONCE THIS MULTISIG EXISTS EVERYWHERE // DELETE THIS TRY CATCH ONCE THIS MULTISIG EXISTS EVERYWHERE
setpriceFeedMultisigProposals( setpriceFeedMultisigProposals(
await getSortedProposals( await getSortedProposals(
@ -127,7 +130,8 @@ export const useMultisig = (wallet: Wallet): MultisigHookData => {
PRICE_FEED_MULTISIG[getMultisigCluster(cluster)] PRICE_FEED_MULTISIG[getMultisigCluster(cluster)]
) )
) )
} catch { } catch (e) {
console.error(e)
setpriceFeedMultisigProposals([]) setpriceFeedMultisigProposals([])
} }