tango-crypto / cardano-wallet-js

cardano-wallet javascript/typescript client
80 stars 34 forks source link

when i create new shelley wallet it resync from 0 #44

Open Aniket1108 opened 2 years ago

Aniket1108 commented 2 years ago

i am using docker compose for running cardano server, and using cardano-wallet-js package for interacting.

my issue is whenever i create new wallet, the wallet sync form 0 and it takes too much time

to create wallet

let parameters = await cardano.Seed.generateRecoveryPhrase()
let words = cardano.Seed.toMnemonicList(parameters);
let passphrase = 'tangoCrypto';
let name = 'wallet';

let wallet = await walletServer.createOrRestoreShelleyWallet(name, words, passphrase);
console.log(wallet);

get wallet info

id: '344e120866c28fd706b2eff539da61b02282a3df', address_pool_gap: 20, balance: { total: { quantity: 0, unit: 'lovelace' }, available: { quantity: 0, unit: 'lovelace' }, reward: { quantity: 0, unit: 'lovelace' } }, assets: { total: [], available: [] }, delegation: { next: [], active: { status: 'not_delegating' } }, name: 'wallet', passphrase: { last_updated_at: '2022-04-26T11:21:24.396104055Z' }, state: { status: 'syncing', progress: { quantity: 0, unit: 'percent' } }, tip: { height: { quantity: 0, unit: 'block' }, epoch_number: 0, time: '2017-09-23T21:44:51Z', absolute_slot_number: 0, slot_number: 0 },

in this state syncing progress start from 0 for every new wallet, i can't use this wallet till it sync. state: { status: 'syncing', progress: { quantity: 0, unit: 'percent' } },

javiertc commented 2 years ago

Hi @Aniket1108 that seems to be an issue with cardano-wallet not syncing. Cardano-wallet has to be synced in order to work with our SDK.

Aniket1108 commented 2 years ago

yeah i got the scenario, for full node wallet it sync from 0 i want to create light wallet that is ready to use after creating need help in that