Skip to content

Commit 79788ed

Browse files
Merge pull request #819 from threshold-network/refactor/update-the-redemption-transaction-pending-text
refactor: update the redemption transaction pending text
2 parents 20c368c + 677bdde commit 79788ed

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@keep-network/keep-ecdsa": "1.8.0",
1919
"@keep-network/random-beacon": "2.0.0",
2020
"@keep-network/tbtc": "1.1.0",
21-
"@keep-network/tbtc-v2.ts": "2.5.0",
21+
"@keep-network/tbtc-v2.ts": "2.5.3",
2222
"@ledgerhq/connect-kit-loader": "1.1.8",
2323
"@ledgerhq/wallet-api-client": "^1.2.0",
2424
"@ledgerhq/wallet-api-client-react": "^1.1.1",

src/hooks/tbtc/useRequestRedemption.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ export const useRequestRedemption = (
1010
onError?: OnErrorCallback
1111
) => {
1212
const threshold = useThreshold()
13+
const pendingText =
14+
"Searching for an active wallet with sufficient funds to proceed with your unmint. Please wait for the transaction prompt, and then sign in your wallet."
1315

1416
return useSendTransactionFromFn(
1517
threshold.tbtc.requestRedemption,
1618
onSuccess,
17-
onError
19+
onError,
20+
pendingText
1821
)
1922
}

src/web3/hooks/useSendTransaction.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ export const useSendTransactionFromFn = <
4545
>(
4646
fn: F,
4747
onSuccess?: OnSuccessCallback,
48-
onError?: OnErrorCallback
48+
onError?: OnErrorCallback,
49+
pendingText?: string
4950
) => {
5051
const {
5152
isBlocked,
@@ -83,7 +84,9 @@ export const useSendTransactionFromFn = <
8384

8485
if (isMounted.current) {
8586
setTransactionStatus(TransactionStatus.PendingWallet)
86-
openModal(ModalType.TransactionIsWaitingForConfirmation)
87+
openModal(ModalType.TransactionIsWaitingForConfirmation, {
88+
pendingText,
89+
})
8790
}
8891
const tx = await fn(...args)
8992

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3449,10 +3449,10 @@
34493449
"@openzeppelin/contracts" "^4.3.2"
34503450
"@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf"
34513451

3452-
"@keep-network/[email protected].0":
3453-
version "2.5.0"
3454-
resolved "https://registry.yarnpkg.com/@keep-network/tbtc-v2.ts/-/tbtc-v2.ts-2.5.0.tgz#20ec4c965209f4a5212f6726ec150358160578c1"
3455-
integrity sha512-22+sRFgjlzRqFa7kF8Z+kqG3QKvF8KldS6kvhIQ07UcT+t+74gjyHwcKZB077DvR8Co8m5bD4ow3gOITJvbZuw==
3452+
"@keep-network/[email protected].3":
3453+
version "2.5.3"
3454+
resolved "https://registry.yarnpkg.com/@keep-network/tbtc-v2.ts/-/tbtc-v2.ts-2.5.3.tgz#91d33e18dadae46ccbf80438ce1663a53d2d0769"
3455+
integrity sha512-27ISrjYzuGj4ovpzl/5j7GaPmvock2mKHYIEhmvNN2pReEcMaUIhW2T87AsLJnCqq14zj5b5QoEc76QQToFRug==
34563456
dependencies:
34573457
"@bitcoinerlab/secp256k1" "^1.0.5"
34583458
"@keep-network/ecdsa" "2.0.1"

0 commit comments

Comments
 (0)