Anchor-Protocol / anchor-earn

The Earn JavaScript SDK for Anchor Protocol.
Apache License 2.0
45 stars 24 forks source link

throw new Error('Insufficient ust balance'); #35

Open Djainesh opened 2 years ago

Djainesh commented 2 years ago

Hello folks, I my facing the above issue while implementing the code of deposit. If anyone could guide me for this error it would be great as I'm new in this field. thank you in advance. i had also entered my Mnemonickey but still it not works for me. It says throw new Error('Insufficient ust balance');

import { Account, AnchorEarn, CHAINS, NETWORKS, TxOutput } from '@anchor-protocol/anchor-earn/dist/facade'; import {MnemonicKey} from '@anchor-protocol/anchor-earn/dist/facade'; import {DENOMS} from '@anchor-protocol/anchor-earn/dist/address-provider'

/**

const account = new MnemonicKey({ mnemonic: '', });

console.log(account.accAddress);

const anchorEarn = new AnchorEarn({ chain: CHAINS.TERRA, network: NETWORKS.BOMBAY_12, privateKey: account.privateKey, });

async function start() { const deposit = await anchorEarn.deposit({ amount: '1.0', currency: DENOMS.UST, })

}

start();