@matchain/matchid-sdk-react 0.1.48-alpha.20 → 0.1.48-alpha.21
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-WHZ3HI4R.mjs → chunk-CHWBALAC.mjs} +11 -11
- package/dist/chunk-CHWBALAC.mjs.map +1 -0
- package/dist/{chunk-3UVHHJP6.mjs → chunk-IV4F5SHJ.mjs} +2 -2
- package/dist/components/index.js +10 -10
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +2 -2
- package/dist/hooks/index.js +10 -10
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-WHZ3HI4R.mjs.map +0 -1
- /package/dist/{chunk-3UVHHJP6.mjs.map → chunk-IV4F5SHJ.mjs.map} +0 -0
package/dist/hooks/index.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -6188,11 +6188,9 @@ function useMatchWalletRecords() {
|
|
|
6188
6188
|
}
|
|
6189
6189
|
}, [chainId, address]);
|
|
6190
6190
|
const { getTransactions, removeTransaction } = useTransactionStore_default();
|
|
6191
|
-
const
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
(0, import_react33.useEffect)(() => {
|
|
6195
|
-
const removeList = localTransaction.filter((n) => items.findIndex((m) => m.hash == n.hash) >= 0);
|
|
6191
|
+
const list = (0, import_react33.useMemo)(() => {
|
|
6192
|
+
const localTransactions = getTransactions(chainId || 0, address) || [];
|
|
6193
|
+
const removeList = localTransactions.filter((n) => items.findIndex((m) => m.hash == n.hash) >= 0);
|
|
6196
6194
|
removeList.forEach((item) => {
|
|
6197
6195
|
removeTransaction({
|
|
6198
6196
|
chainId: chainId || 0,
|
|
@@ -6200,16 +6198,18 @@ function useMatchWalletRecords() {
|
|
|
6200
6198
|
address
|
|
6201
6199
|
});
|
|
6202
6200
|
});
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
...getTransactions(chainId || 0, address) || [],
|
|
6201
|
+
const saveList = localTransactions.filter((n) => items.findIndex((m) => m.hash == n.hash) < 0);
|
|
6202
|
+
return [
|
|
6203
|
+
...saveList,
|
|
6207
6204
|
...items
|
|
6208
6205
|
].sort((a, b) => {
|
|
6209
6206
|
const btimestamp = typeof b.timestamp === "string" ? parseInt(b.timestamp) : b.timestamp;
|
|
6210
6207
|
const atimestamp = typeof a.timestamp === "string" ? parseInt(a.timestamp) : a.timestamp;
|
|
6211
6208
|
return btimestamp - atimestamp;
|
|
6212
|
-
})
|
|
6209
|
+
});
|
|
6210
|
+
}, [getTransactions, chainId, items, address]);
|
|
6211
|
+
return {
|
|
6212
|
+
items: list,
|
|
6213
6213
|
fetchMoreData,
|
|
6214
6214
|
hasMore
|
|
6215
6215
|
};
|