Skip to content

Commit

Permalink
Merge pull request #3615 from balancer/hotfix/refetch-allowances
Browse files Browse the repository at this point in the history
Hotfix/refetch allowances (DM)
  • Loading branch information
timjrobinson committed Jul 4, 2023
2 parents 5e7850b + 077e11a commit d72a169
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/composables/approvals/useTokenApprovalActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ export default function useTokenApprovalActions() {
/**
* COMPOSABLES
*/
const { approvalsRequired, approvalRequired, getToken, injectSpenders } =
useTokens();
const {
refetchAllowances,
approvalsRequired,
approvalRequired,
getToken,
injectSpenders,
} = useTokens();
const { t } = useI18n();
const { getSigner } = useWeb3();
const { addTransaction } = useTransactions();
Expand Down Expand Up @@ -99,6 +104,7 @@ export default function useTokenApprovalActions() {
spender: string
): Promise<boolean> {
await injectSpenders([spender]);
await refetchAllowances();

return !approvalRequired(
amountToApprove.address,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/config/gnosis-chain/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const config: Config = {
unknown: false,
visibleInUI: true,
testNetwork: false,
rpc: 'https://poa-xdai.gateway.pokt.network/v1/lb/91bc0e12a76e7a84dd76189d',
rpc: 'https://rpc.gnosischain.com',
ws: 'wss://rpc.gnosischain.com/wss',
publicRpc: 'https://rpc.gnosis.gateway.fm',
explorer: 'https://gnosisscan.io',
Expand Down

1 comment on commit d72a169

@vercel
Copy link

@vercel vercel bot commented on d72a169 Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.