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

allow setting the preferred feeSize #50

Closed
wants to merge 7 commits into from

Conversation

jojobyte
Copy link

When sending a very small amount 0.0001 as a full transfer, Dash Insight API failed with a 400 complaining the fee of 191 was less than the minimum 192.

This allows overriding the default selected fee from fee.min (191) to fee[feeSize].

feeSize can be a string value of min, mid, or max corresponding to the values returned by DashTx.appraise(...)

let txDraft = await dashwallet.legacy.draftTx({
  utxos,
  inputs,
  output,
  feeSize: 'max',
})

@jojobyte jojobyte added the enhancement New feature or request label Mar 21, 2024
@jojobyte jojobyte requested a review from coolaj86 March 21, 2024 10:08
@jojobyte jojobyte self-assigned this Mar 21, 2024
@riongull
Copy link

@coolaj86, as discussed, go ahead and fix the underlying issue that's causing the error rather than giving users an option to select fees.

@coolaj86 coolaj86 force-pushed the ref-ext-storage branch 7 times, most recently from bcc6328 to 6e7713e Compare March 27, 2024 09:37
@coolaj86
Copy link
Member

coolaj86 commented Mar 27, 2024

Replaced by:

The root cause was essentially this:

  let lastTime;
  for (;;) {
    // ...
-   lastTime = thisTime;
    if (thisTime === lastTime) {
      break;
    }
+   lastTime = thisTime;
    // ...
  }

But there were a tonne of other bugs in the code.

@coolaj86 coolaj86 closed this Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants