Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug/Feature: insufficient funds #41

Open
eino-makitalo opened this issue Dec 27, 2021 · 1 comment
Open

Bug/Feature: insufficient funds #41

eino-makitalo opened this issue Dec 27, 2021 · 1 comment

Comments

@eino-makitalo
Copy link

Current dev version at least.
Wayt to reproduce bug:
`

  1. create singlekeywallet
  2. make exportX( "1000000000", "C",)
    ... you will get "Insufficient Funds error"

How I fixed it

async exportX(amountAvax: string, destination:ExportChainsX): Promise<string> {
    // const fee: BN = xChain.getDefaultTxFee();
    const amount:BN = new BN(amountAvax);
    // FIX make SingleWallet to update it's uxtos
    const uxtos = await this.swallet.updateUtxosX()
    console.log("destination fro X to ", destination2);//, uxtos);
    return this.swallet.exportXChain(amount, destination2);
  }

I think there should be way to refresh Wallet state after constructing it / I understand the need separate routines which makes network calls and which are not

@eino-makitalo
Copy link
Author

Same with exportP but not with exportC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant