Open
Description
Expected Behavior
A withdrawal can be done simply by running something like:
client.platform.identities.withdrawCredits(identity, withdrawalAmount, { toAddress });
Current Behavior
This error is returned:
StateTransitionBroadcastError: Core fee per byte 0 must be part of fibonacci sequence and not less than 1]
Possible Solution
The following appears to work:
client.wallet.storage.getDefaultChainStore().state.fees.minRelay = 1000
client.platform.identities.withdrawCredits(identity, withdrawalAmount, { toAddress });
It appears minRelay
in at least some cases is 0 (actually -0). This results in a value of -1 being returned as the coreFeePerByte here: https://github.com/dashpay/platform/blob/v1.4-dev/packages/js-dash-sdk/src/SDK/Client/Platform/methods/identities/creditWithdrawal.ts#L89-L94
Steps to Reproduce (for bugs)
Run this with a valid identity, amount, and address:
client.platform.identities.withdrawCredits(identity, withdrawalAmount, { toAddress });
Context
Your Environment
- Version used: JS SDK 1.4-dev.8 against testnet
- Environment name and version (e.g. Chrome 39, node.js 5.4): Node 20.10
- Operating System and version (desktop, server, or mobile): Ubuntu 22
Metadata
Metadata
Assignees
Type
Projects
Status
Backlog