Skip to content

Commit

Permalink
Merge pull request #6432 from blockchain/fix/user-proper-wthdraw-method
Browse files Browse the repository at this point in the history
feat(withdraw): added logic to use properly selected withdrawal method
  • Loading branch information
milan-bc authored Aug 15, 2024
2 parents 7fd9b1b + d58f9b5 commit 51ac75d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ const EnterAmountContainer = (props: Props) => {
paymentAccount = undefined
}

if (props.beneficiary && paymentAccount && paymentAccount.id !== props.beneficiary?.id) {
paymentAccount = props.beneficiary
}

// Connecting the paymentAccount to the submit handler here because there's some nasty logic
// above here to determine the account being used to withdraw to. This should all ideally be refactored
const submitter = handleSubmit(paymentAccount)
Expand Down

0 comments on commit 51ac75d

Please sign in to comment.