Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix/1.23.4 #943

Merged
merged 5 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@balancer-labs/frontend-v2",
"version": "1.23.3",
"version": "1.23.4",
"engines": {
"node": "14.x",
"npm": ">=7"
Expand Down
38 changes: 20 additions & 18 deletions src/composables/useTransactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,25 +396,27 @@ export default function useTransactions() {
}

function checkTxActivity(transaction: Transaction) {
provider.value
.getTransactionReceipt(transaction.id)
.then(tx => {
if (tx != null) {
finalizeTransaction(transaction.id, 'tx', tx);
}
})
.catch(e =>
console.log(
'[Transactions]: Failed to fetch tx information',
transaction,
e
)
)
.finally(() =>
updateTransaction(transaction.id, 'tx', {
lastCheckedBlockNumber: blockNumber.value
if (provider.value != null) {
provider.value
.getTransactionReceipt(transaction.id)
.then(tx => {
if (tx != null) {
finalizeTransaction(transaction.id, 'tx', tx);
}
})
);
.catch(e =>
console.log(
'[Transactions]: Failed to fetch tx information',
transaction,
e
)
)
.finally(() =>
updateTransaction(transaction.id, 'tx', {
lastCheckedBlockNumber: blockNumber.value
})
);
}
}

async function handlePendingTransactions() {
Expand Down
7 changes: 5 additions & 2 deletions src/composables/watchers/useWeb3Watchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export default function useWeb3Watchers() {
isMismatchedNetwork,
isUnsupportedNetwork,
blockNumber,
connectToAppNetwork
connectToAppNetwork,
isWalletReady
} = useWeb3();
const { addAlert, removeAlert } = useAlerts();
const { refetchBalances, refetchAllowances } = useTokens();
Expand Down Expand Up @@ -92,6 +93,8 @@ export default function useWeb3Watchers() {
});

watch(blockNumber, async () => {
handlePendingTransactions();
if (isWalletReady.value) {
handlePendingTransactions();
}
});
}