diff --git a/web-wallet/src/lib/containers/StakeContract/StakeContract.svelte b/web-wallet/src/lib/containers/StakeContract/StakeContract.svelte index 1d1718305..c83542988 100644 --- a/web-wallet/src/lib/containers/StakeContract/StakeContract.svelte +++ b/web-wallet/src/lib/containers/StakeContract/StakeContract.svelte @@ -14,7 +14,6 @@ import { Gas } from "$lib/vendor/w3sper.js/src/mod"; import { createCurrencyFormatter, luxToDusk } from "$lib/dusk/currency"; - import { getLastTransactionHash } from "$lib/transactions"; import { gasStore, operationsStore, @@ -70,18 +69,18 @@ stake: (amount, gasPrice, gasLimit) => walletStore .stake(amount, new Gas({ limit: gasLimit, price: gasPrice })) - .then(getLastTransactionHash), + .then(getKey("hash")), unstake: (gasPrice, gasLimit) => walletStore .unstake(new Gas({ limit: gasLimit, price: gasPrice })) - .then(getLastTransactionHash), + .then(getKey("hash")), "withdraw-rewards": (gasPrice, gasLimit) => walletStore .withdrawReward( $walletStore.stakeInfo.reward, new Gas({ limit: gasLimit, price: gasPrice }) ) - .then(getLastTransactionHash), + .then(getKey("hash")), }; /** @type {(operations: ContractOperation[]) => ContractOperation[]} */ diff --git a/web-wallet/src/lib/stores/stores.d.ts b/web-wallet/src/lib/stores/stores.d.ts index ea4c0da33..8f24ae0fc 100644 --- a/web-wallet/src/lib/stores/stores.d.ts +++ b/web-wallet/src/lib/stores/stores.d.ts @@ -126,7 +126,7 @@ type WalletStoreServices = { stake: ( amount: bigint, gas: import("$lib/vendor/w3sper.js/src/mod").Gas - ) => Promise; + ) => Promise; sync: (fromBlock?: bigint) => Promise; @@ -141,12 +141,14 @@ type WalletStoreServices = { gas: import("$lib/vendor/w3sper.js/src/mod").Gas ) => Promise; - unstake: (gas: import("$lib/vendor/w3sper.js/src/mod").Gas) => Promise; + unstake: ( + gas: import("$lib/vendor/w3sper.js/src/mod").Gas + ) => Promise; withdrawReward: ( amount: bigint, gas: import("$lib/vendor/w3sper.js/src/mod").Gas - ) => Promise; + ) => Promise; }; type WalletStore = Readable & WalletStoreServices;