Skip to content

Commit

Permalink
Merge pull request #4705 from EdgeApp/matthew/bitpayRbf
Browse files Browse the repository at this point in the history
Disable RBF for payment protocol transactions
  • Loading branch information
paullinator authored Jan 12, 2024
2 parents 97e1acf + 372b601 commit adfe6bd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- changed: Use new EdgeTxAction data for Thorchain and Tron stake plugins
- changed: Make useAsyncEffect tags required
- changed: Rettry failed WalletConnect initializations
- changed: Disable RBF for payment protocol transactions
- fixed: USP vs legacy landing experiment distribution
- fixed: Paybis sell from Tron USDT
- fixed: Remove `minWidth` style from stake option card
Expand Down
10 changes: 10 additions & 0 deletions src/actions/PaymentProtoActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,16 @@ export async function launchPaymentProto(navigation: NavigationBase, account: Ed
}),
metadata
}

// RBF transactions aren't supported so it needs to be disabled
if (selectedWallet.currencyInfo.canReplaceByFee) {
Object.assign(spendInfo, {
otherParams: {
enableRbf: false
}
})
}

if (requiredFeeRate != null) {
spendInfo.networkFeeOption = 'custom'
spendInfo.customNetworkFee = { satPerByte: Math.ceil(requiredFeeRate) }
Expand Down
2 changes: 2 additions & 0 deletions src/util/DeepLinkParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export function parseDeepLink(uri: string, opts: { aztecoApiKey?: string } = {})
// If the URI started with 'bitcoin:', etc.
uri = betterUrl.query.r
return { type: 'paymentProto', uri }
} else if (betterUrl.hostname.includes('bitpay.com')) {
return { type: 'paymentProto', uri }
}

// Handle the edge:// scheme:
Expand Down

0 comments on commit adfe6bd

Please sign in to comment.