@ecency/wallets 1.5.21 → 1.5.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/browser/index.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ interface AccountPointsResponse {
|
|
|
67
67
|
*
|
|
68
68
|
* Keep attention: this mutation doesn't save wallet to somewhere in a server
|
|
69
69
|
*/
|
|
70
|
-
declare function useWalletCreate(username: string, currency: EcencyWalletCurrency): {
|
|
70
|
+
declare function useWalletCreate(username: string, currency: EcencyWalletCurrency, importedSeed?: string): {
|
|
71
71
|
createWallet: _tanstack_react_query.UseMutationResult<EcencyTokenMetadata, Error, void, unknown>;
|
|
72
72
|
importWallet: () => void;
|
|
73
73
|
};
|
package/dist/browser/index.js
CHANGED
|
@@ -3617,7 +3617,7 @@ function getTokenOperationsQueryOptions(token, username, isForOwner = false, cur
|
|
|
3617
3617
|
queryFn: async () => {
|
|
3618
3618
|
const queryClient = getQueryClient();
|
|
3619
3619
|
const normalizedToken = token.toUpperCase();
|
|
3620
|
-
if (!username) {
|
|
3620
|
+
if (!username || !isForOwner) {
|
|
3621
3621
|
return [];
|
|
3622
3622
|
}
|
|
3623
3623
|
try {
|
|
@@ -3753,12 +3753,13 @@ var PATHS = {
|
|
|
3753
3753
|
["APT" /* APT */]: "m/44'/637'/0'/0'/0'"
|
|
3754
3754
|
// Aptos (BIP44)
|
|
3755
3755
|
};
|
|
3756
|
-
function useWalletCreate(username, currency) {
|
|
3757
|
-
const { data:
|
|
3756
|
+
function useWalletCreate(username, currency, importedSeed) {
|
|
3757
|
+
const { data: generatedMnemonic } = useSeedPhrase(username);
|
|
3758
3758
|
const queryClient = useQueryClient();
|
|
3759
3759
|
const createWallet = useMutation({
|
|
3760
3760
|
mutationKey: ["ecency-wallets", "create-wallet", username, currency],
|
|
3761
3761
|
mutationFn: async () => {
|
|
3762
|
+
const mnemonic = importedSeed || generatedMnemonic;
|
|
3762
3763
|
if (!mnemonic) {
|
|
3763
3764
|
throw new Error("[Ecency][Wallets] - No seed to create a wallet");
|
|
3764
3765
|
}
|