Skip to content

Commit 3fa7e32

Browse files
committed
fix multiple api calls
1 parent f1085b2 commit 3fa7e32

6 files changed

+18
-6
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### [9.10.1](https://github.com/xdevguild/nextjs-dapp-template/releases/tag/v9.10.1) (2024-11-10)
2+
- add transaction ids to prevent multiple API calls when using Web Wallet signing provider
3+
14
### [9.10.0](https://github.com/xdevguild/nextjs-dapp-template/releases/tag/v9.10.0) (2024-11-09)
25
- update Next
36
- update useElven

components/demo/simple-deploy-sc-demo.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ export const SimpleDeployScDemo = ({
1818
}) => {
1919
const { explorerAddress } = useConfig();
2020
const { loggedIn } = useLoggingIn();
21-
const { deploy, scAddress, txResult, pending } = useScDeploy({ cb });
21+
const { deploy, scAddress, txResult, pending } = useScDeploy({
22+
cb,
23+
id: 'SimpleDeployScDemo',
24+
});
2225

2326
const handleDeploy = () => {
2427
deploy({ source: '/piggybank.wasm' });

components/demo/simple-egld-tx-demo.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const SimpleEGLDTxDemo = ({
1818
}: {
1919
cb: (params: TransactionCallbackParams) => void;
2020
}) => {
21-
const { pending, triggerTx } = useTransaction({ cb });
21+
const { pending, triggerTx } = useTransaction({ cb, id: 'SimpleEGLDTxDemo' });
2222
const { loggedIn } = useLoggingIn();
2323
const { explorerAddress, chainType } = useConfig();
2424

components/demo/simple-esdt-tx-demo.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ export const SimpleESDTTxDemo = ({
1717
}: {
1818
cb: (params: TransactionCallbackParams) => void;
1919
}) => {
20-
const { transfer, pending } = useTokenTransfer({ cb });
20+
const { transfer, pending } = useTokenTransfer({
21+
cb,
22+
id: 'SimpleESDTTxDemo',
23+
});
2124
const { loggedIn } = useLoggingIn();
2225
const { explorerAddress, chainType } = useConfig();
2326

components/demo/simple-nft-mint-demo.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ export const SimpleNftMintDemo = ({
2929
cb: (params: TransactionCallbackParams) => void;
3030
}) => {
3131
const { loggedIn } = useLoggingIn();
32-
const { pending, triggerTx } = useTransaction({ cb });
32+
const { pending, triggerTx } = useTransaction({
33+
cb,
34+
id: 'SimpleNftMintDemo',
35+
});
3336
const { activeGuardianAddress } = useAccount();
3437
const { explorerAddress, chainType } = useConfig();
3538

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-dapp-template",
3-
"version": "9.10.0",
3+
"version": "9.10.1",
44
"author": "Julian Ćwirko <julian.io>",
55
"license": "MIT",
66
"homepage": "https://github.com/xdevguild/nextjs-dapp-template",
@@ -53,4 +53,4 @@
5353
"overrides": {
5454
"rxjs": "7.8.1"
5555
}
56-
}
56+
}

0 commit comments

Comments
 (0)