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

Getting minUtxo error for ada deducted by wallet #337

Open
kunj77 opened this issue Jun 19, 2024 · 1 comment
Open

Getting minUtxo error for ada deducted by wallet #337

kunj77 opened this issue Jun 19, 2024 · 1 comment

Comments

@kunj77
Copy link

kunj77 commented Jun 19, 2024

I am trying to update a swap via a transaction, however, I get error "Error: Value 2879080 less tan the minimum UTXO value 2900630" while doing so. 2879080 is added to the utxo by the wallet and is not something that we specify. I noticed that the minUtxo is hardcoded here

const COINS_PER_UTXO_BYTE: u64 = 4310;
am not sure if this error is due to this. However, since the ada in the utxo is added by wallet I would expect it to be acceptable for transactions. Can you please check this out?

@dcSpark dcSpark deleted a comment Jul 3, 2024
@rooooooooob
Copy link
Contributor

That is only a private const used in the tests. It's non-public and only referred to in the tests module there as those expected results were also taken form mainnet at the time to match.

The public function min_ada_required in that file takes it as an explicit argument.

@kunj77 Could you please post the CBOR of your transaction output please?

e.g. console.log(output.to_cbor_hex()) (from wasm) or println!("{}", hex::encode(&output.to_cbor_bytes())) from rust (or just println!("{:?}", output.to_cbor_bytes()) if you don't have the hex crate installed).

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

2 participants