@ecency/wallets 1.3.12 → 1.3.13
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/ecency-sdk.es.js
CHANGED
|
@@ -22690,37 +22690,41 @@ function cc(i, h = !1) {
|
|
|
22690
22690
|
)
|
|
22691
22691
|
) : {};
|
|
22692
22692
|
}
|
|
22693
|
-
function y1(i) {
|
|
22694
|
-
const
|
|
22693
|
+
function y1(i, h) {
|
|
22694
|
+
const b = ln(), { data: y } = Yt(Pt(i)), { mutateAsync: s } = d0(i);
|
|
22695
22695
|
return Wt({
|
|
22696
|
-
mutationKey: ["ecency-wallets", "save-wallet-to-metadata",
|
|
22697
|
-
mutationFn: async (
|
|
22698
|
-
var
|
|
22699
|
-
if (!
|
|
22696
|
+
mutationKey: ["ecency-wallets", "save-wallet-to-metadata", y],
|
|
22697
|
+
mutationFn: async (a) => {
|
|
22698
|
+
var e;
|
|
22699
|
+
if (!y)
|
|
22700
22700
|
throw new Error("[SDK][Wallets] – no account data to save wallets");
|
|
22701
|
-
const
|
|
22702
|
-
(
|
|
22703
|
-
),
|
|
22704
|
-
symbol:
|
|
22705
|
-
type:
|
|
22706
|
-
meta:
|
|
22707
|
-
})) ?? [],
|
|
22708
|
-
({ type:
|
|
22709
|
-
),
|
|
22710
|
-
|
|
22711
|
-
$t.mergeDeep(
|
|
22701
|
+
const p = cc(
|
|
22702
|
+
(e = y.profile) == null ? void 0 : e.tokens
|
|
22703
|
+
), f = a.map(({ currency: t, type: o, privateKey: u, username: d, ...m }) => ({
|
|
22704
|
+
symbol: t,
|
|
22705
|
+
type: o,
|
|
22706
|
+
meta: m
|
|
22707
|
+
})) ?? [], l = cc(f, !0), n = f.filter(
|
|
22708
|
+
({ type: t }) => t !== "CHAIN"
|
|
22709
|
+
), r = $t.pipe(
|
|
22710
|
+
p,
|
|
22711
|
+
$t.mergeDeep(l),
|
|
22712
22712
|
$t.values()
|
|
22713
22713
|
);
|
|
22714
|
-
return
|
|
22714
|
+
return s({
|
|
22715
22715
|
tokens: [
|
|
22716
|
-
...
|
|
22717
|
-
...
|
|
22716
|
+
...n,
|
|
22717
|
+
...r
|
|
22718
22718
|
]
|
|
22719
22719
|
});
|
|
22720
22720
|
},
|
|
22721
|
-
|
|
22722
|
-
|
|
22723
|
-
|
|
22721
|
+
onError: h == null ? void 0 : h.onError,
|
|
22722
|
+
onSuccess: (a, p, f) => {
|
|
22723
|
+
var l;
|
|
22724
|
+
(l = h == null ? void 0 : h.onSuccess) == null || l.call(h, a, p, f), b.invalidateQueries({
|
|
22725
|
+
queryKey: cp(i).queryKey
|
|
22726
|
+
});
|
|
22727
|
+
}
|
|
22724
22728
|
});
|
|
22725
22729
|
}
|
|
22726
22730
|
const yp = {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useMutation } from '@tanstack/react-query';
|
|
1
2
|
import { EcencyTokenMetadata } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* Saving of token(s) metadata to Hive profile
|
|
@@ -5,4 +6,4 @@ import { EcencyTokenMetadata } from '../types';
|
|
|
5
6
|
*
|
|
6
7
|
* Basically, this mutation is a convenient wrapper for update profile operation
|
|
7
8
|
*/
|
|
8
|
-
export declare function useSaveWalletInformationToMetadata(username: string): import('@tanstack/react-query').UseMutationResult<unknown,
|
|
9
|
+
export declare function useSaveWalletInformationToMetadata(username: string, options?: Pick<Parameters<typeof useMutation>[0], "onSuccess" | "onError">): import('@tanstack/react-query').UseMutationResult<unknown, unknown, EcencyTokenMetadata[], unknown>;
|