@kimafinance/kima-transaction-widget 1.3.3 → 1.3.4
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.
- package/dist/index.cjs +11 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4986,15 +4986,22 @@ var TransactionWidget = ({ theme }) => {
|
|
|
4986
4986
|
const { data, error } = useGetTxData_default(txId, dAppOption, backendUrl);
|
|
4987
4987
|
const transactionSourceChain = useMemo13(
|
|
4988
4988
|
() => networks.find(
|
|
4989
|
-
(network) => mode === "status" /* status */ ?
|
|
4989
|
+
(network) => network.shortName === (mode === "status" /* status */ ? data?.sourceChain : sourceChain.shortName)
|
|
4990
4990
|
),
|
|
4991
|
-
[data, mode]
|
|
4991
|
+
[data, mode, sourceChain]
|
|
4992
4992
|
);
|
|
4993
4993
|
const transactionTargetChain = useMemo13(
|
|
4994
4994
|
() => networks.find(
|
|
4995
|
-
(network) => mode === "status" /* status */ ?
|
|
4995
|
+
(network) => network.shortName === (mode === "status" /* status */ ? data?.targetChain : targetChain.shortName)
|
|
4996
4996
|
),
|
|
4997
|
-
[data, mode]
|
|
4997
|
+
[data, mode, targetChain]
|
|
4998
|
+
);
|
|
4999
|
+
console.log(
|
|
5000
|
+
"tx details: ",
|
|
5001
|
+
networks,
|
|
5002
|
+
transactionSourceChain,
|
|
5003
|
+
transactionTargetChain,
|
|
5004
|
+
data
|
|
4998
5005
|
);
|
|
4999
5006
|
const isValidTxId = useMemo13(() => {
|
|
5000
5007
|
return !(!txId || typeof txId === "string" && txId.length === 0 || typeof txId === "number" && txId < 0);
|