@ecency/wallets 1.5.21 → 1.5.23
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/node/index.mjs
CHANGED
|
@@ -3615,7 +3615,7 @@ function getTokenOperationsQueryOptions(token, username, isForOwner = false, cur
|
|
|
3615
3615
|
queryFn: async () => {
|
|
3616
3616
|
const queryClient = getQueryClient();
|
|
3617
3617
|
const normalizedToken = token.toUpperCase();
|
|
3618
|
-
if (!username) {
|
|
3618
|
+
if (!username || !isForOwner) {
|
|
3619
3619
|
return [];
|
|
3620
3620
|
}
|
|
3621
3621
|
try {
|
|
@@ -3751,12 +3751,13 @@ var PATHS = {
|
|
|
3751
3751
|
["APT" /* APT */]: "m/44'/637'/0'/0'/0'"
|
|
3752
3752
|
// Aptos (BIP44)
|
|
3753
3753
|
};
|
|
3754
|
-
function useWalletCreate(username, currency) {
|
|
3755
|
-
const { data:
|
|
3754
|
+
function useWalletCreate(username, currency, importedSeed) {
|
|
3755
|
+
const { data: generatedMnemonic } = useSeedPhrase(username);
|
|
3756
3756
|
const queryClient = useQueryClient();
|
|
3757
3757
|
const createWallet = useMutation({
|
|
3758
3758
|
mutationKey: ["ecency-wallets", "create-wallet", username, currency],
|
|
3759
3759
|
mutationFn: async () => {
|
|
3760
|
+
const mnemonic = importedSeed || generatedMnemonic;
|
|
3760
3761
|
if (!mnemonic) {
|
|
3761
3762
|
throw new Error("[Ecency][Wallets] - No seed to create a wallet");
|
|
3762
3763
|
}
|