@matchain/matchid-sdk-react 0.1.48-alpha.22 → 0.1.48-alpha.24
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/{chunk-MUEDDGKX.mjs → chunk-EOT6XIVG.mjs} +2 -2
- package/dist/{chunk-WPXA4QPX.mjs → chunk-TSPOB4DT.mjs} +25 -47
- package/dist/chunk-TSPOB4DT.mjs.map +1 -0
- package/dist/components/index.js +13 -35
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/hooks/api/index.js +0 -1
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +3 -3
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +8 -27
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/{index-Dhtyz0pT.d.mts → index-DUHkH5t-.d.mts} +11 -0
- package/dist/{index-CFKZWJVt.d.ts → index-DcQm2dkr.d.ts} +11 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/example/src/pages/Wallet/components/MatchWallet.tsx +24 -2
- package/package.json +1 -1
- package/dist/chunk-WPXA4QPX.mjs.map +0 -1
- /package/dist/{chunk-MUEDDGKX.mjs.map → chunk-EOT6XIVG.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
api_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EOT6XIVG.mjs";
|
|
4
4
|
import {
|
|
5
5
|
MatchProvider,
|
|
6
6
|
components_exports,
|
|
7
7
|
hooks_exports,
|
|
8
8
|
useMatch
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TSPOB4DT.mjs";
|
|
10
10
|
import {
|
|
11
11
|
types_exports
|
|
12
12
|
} from "./chunk-HBOS3RBL.mjs";
|
|
13
13
|
import "./chunk-UA6XHZHX.mjs";
|
|
14
|
-
import "./chunk-5JHHHLG4.mjs";
|
|
15
14
|
import {
|
|
16
15
|
ui_exports
|
|
17
16
|
} from "./chunk-FB5MHLWX.mjs";
|
|
17
|
+
import "./chunk-5JHHHLG4.mjs";
|
|
18
18
|
import "./chunk-LHNKZISB.mjs";
|
|
19
19
|
import {
|
|
20
20
|
chains_exports
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
useMatchChain,
|
|
3
|
+
useMatchWallet,
|
|
4
|
+
useMatchWalletAssets,
|
|
5
|
+
useModal,
|
|
6
|
+
useMatchWalletAssetList
|
|
7
|
+
} from "@matchain/matchid-sdk-react/hooks";
|
|
2
8
|
import {Button} from "@matchain/matchid-sdk-react/ui";
|
|
3
|
-
import {WalletAsset, TokenDetail,TransactionList} from "@matchain/matchid-sdk-react/components";
|
|
9
|
+
import {WalletAsset, TokenDetail, TransactionList} from "@matchain/matchid-sdk-react/components";
|
|
4
10
|
import ButtonGroup from "@/components/ButtonGroup";
|
|
5
11
|
import {WalletAssetMergeType} from "@matchain/matchid-sdk-react/types";
|
|
6
12
|
|
|
@@ -15,9 +21,25 @@ export default function MatchWallet() {
|
|
|
15
21
|
})
|
|
16
22
|
}
|
|
17
23
|
}
|
|
24
|
+
const walletAssets = useMatchWalletAssets()
|
|
25
|
+
const matchWalletAssetList = useMatchWalletAssetList({
|
|
26
|
+
list: walletAssets.mergedAssets
|
|
27
|
+
})
|
|
28
|
+
const balance = matchWalletAssetList.list.reduce((pre, cur) => {
|
|
29
|
+
return pre + (cur.value || 0)
|
|
30
|
+
}, 0)
|
|
31
|
+
|
|
18
32
|
return (
|
|
19
33
|
<div className={"mt-[50px]"}>
|
|
20
34
|
<ButtonGroup title={"CustomWalletUI"}></ButtonGroup>
|
|
35
|
+
<div className={`flex gap-[10px] break-all`}>
|
|
36
|
+
<span>matchWalletAssetList.isFetched:{matchWalletAssetList.isFetched.toString()}</span>
|
|
37
|
+
<span>walletAssets.assetListQuery.isFetched:{walletAssets.assetListQuery.isFetched.toString()}</span>
|
|
38
|
+
<span>walletAssets.importTokenQuery.isFetched:{walletAssets.importTokenQuery.isFetched.toString()}</span>
|
|
39
|
+
<span>matchWalletAssetList.nativeBalanceQuery.isFetched:{matchWalletAssetList.nativeBalanceQuery.isFetched.toString()}</span>
|
|
40
|
+
<span>matchWalletAssetList.erc20BalanceQuery.isFetched:{matchWalletAssetList.erc20BalanceQuery.isFetched.toString()}</span>
|
|
41
|
+
<span>balance:{balance}</span>
|
|
42
|
+
</div>
|
|
21
43
|
<ButtonGroup>
|
|
22
44
|
<Button size={"sm"} onClick={chain.showChangeNetwork}>{chain.chain?.id}:{chain.chain?.name}</Button>
|
|
23
45
|
<Button size={"sm"} onClick={wallet.showReceiveModal}>ShowReceive</Button>
|