@coin-voyage/paykit 2.4.0-beta.1 → 2.4.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,8 +30,8 @@ function getConfirmationState(payOrder, isDeposit, locales, optimisticConfirmati
|
|
|
30
30
|
}
|
|
31
31
|
const payment = payOrder.payment;
|
|
32
32
|
const confirmOptimistically = optimisticConfirmation && !isDeposit;
|
|
33
|
-
const sourceTxURL = payment?.src.chain_id &&
|
|
34
|
-
? getChainExplorerTxUrl(payment.src.chain_id,
|
|
33
|
+
const sourceTxURL = payment?.src.chain_id && payment?.source_tx_hash
|
|
34
|
+
? getChainExplorerTxUrl(payment.src.chain_id, payment.source_tx_hash)
|
|
35
35
|
: undefined;
|
|
36
36
|
if (payOrder.status === PayOrderStatus.FAILED) {
|
|
37
37
|
return {
|
|
@@ -55,7 +55,7 @@ function getConfirmationState(payOrder, isDeposit, locales, optimisticConfirmati
|
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
if (payOrder.status === PayOrderStatus.COMPLETED) {
|
|
58
|
-
const receivingTxHash =
|
|
58
|
+
const receivingTxHash = payment?.destination_tx_hash;
|
|
59
59
|
const destChainId = payment?.dst.chain_id;
|
|
60
60
|
const txURL = isDeposit && destChainId && receivingTxHash ? getChainExplorerTxUrl(destChainId, receivingTxHash) : sourceTxURL;
|
|
61
61
|
return {
|
|
@@ -42,9 +42,9 @@ export function usePayFromWallet({ senderAddr, payOrder, setPayOrder, chainType,
|
|
|
42
42
|
? { address: paymentData.src.address, decimals: paymentData.src.decimals }
|
|
43
43
|
: undefined,
|
|
44
44
|
});
|
|
45
|
+
paymentData.source_tx_hash = txHash;
|
|
45
46
|
setPayOrder({
|
|
46
47
|
...payOrder,
|
|
47
|
-
deposit_tx_hash: txHash,
|
|
48
48
|
payment: paymentData,
|
|
49
49
|
status: paymentDetails.status,
|
|
50
50
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coin-voyage/paykit",
|
|
3
3
|
"description": "Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.",
|
|
4
|
-
"version": "2.4.0-beta.
|
|
4
|
+
"version": "2.4.0-beta.3",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"author": "Lars <lars@coinvoyage.io>",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"styled-components": "^5.3.11",
|
|
65
65
|
"uuid": "13.0.0",
|
|
66
66
|
"@coin-voyage/crypto": "2.4.0-beta.0",
|
|
67
|
-
"@coin-voyage/shared": "2.4.0-beta.
|
|
67
|
+
"@coin-voyage/shared": "2.4.0-beta.1"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/qrcode": "1.5.5",
|