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

Disable RBF for payment protocol transactions #4705

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading