Skip to content

Commit

Permalink
Suggested feeRate not checked
Browse files Browse the repository at this point in the history
  • Loading branch information
0xp3gasus committed Oct 27, 2023
1 parent 300aabf commit 76ef76a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/xchain-doge/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,13 @@ class Client extends UTXOClient {
* @returns {TxHash} The transaction hash.
*/
async transfer(params: TxParams & { feeRate?: FeeRate }): Promise<TxHash> {
const feeRate = params.feeRate || (await this.getSuggestedFeeRate())
checkFeeBounds(this.feeBounds, feeRate)
let feeRate: number
if (params.feeRate) {
feeRate = params.feeRate
checkFeeBounds(this.feeBounds, feeRate)
} else {
feeRate = await this.getSuggestedFeeRate()
}

const fromAddressIndex = params?.walletIndex || 0
const { rawUnsignedTx } = await this.prepareTx({
Expand Down

0 comments on commit 76ef76a

Please sign in to comment.