When I try to restore a users wallet through cardano-wallet (testnet) I get this payload using the [POST] /wallets
endpoint
{
"code": "wallet_already_exists",
"message": "This operation would yield a wallet with the following id: 8209f39a872faa51a63c0f7bb8d748067cf7b2b0 However, I already know of a wallet with this id."
}
The following payload I send is the name
,mnemonic_sentence
& passphrase
with the same arguments I gave it while creating the wallet. I even went as far as to change the name
& passphrase
but I still get the same wallet_already_exists
error.
{
"name": "Recovery Wallet",
"mnemonic_sentence": [
<15 KEYS>
],
"passphrase": "wallet_pass_01"
}
I read that Cardano-Wallet
should lookup a wallet and return its funds when a mnemonic_sentence derives a wallet that already exists. As you can see this isn't working for me & I don't see how I can force a recovery.
/wallets/{walletId}/addresses
which would bewallets/8209f39a872faa51a63c0f7bb8d748067cf7b2b0/addresses
in your case. Then check address balances. Or you could delete the wallet and restore it again if you want.cardano-wallet
is a stateful services the DB checks to see if a wallet was created already by itself, resulting in a DB lookup for that ID. If there is no ID in the DB & on the cardano-network then it'll create a wallet for you. Now if you want to restore a wallet that your instance ofcardano-wallet
has created then it'll throw thewallet_already_exists
error. So the solution is either me having to create my own cardano server to manage keys or I have to wipe thecardano-wallet
db each time :(