Skip to content

Commit

Permalink
feat: paymentMethodId cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Han committed Dec 15, 2021
1 parent f404db4 commit c1acefe
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -828,17 +828,20 @@ export default ({ api, coreSagas, networks }: { api: APIType; coreSagas: any; ne
try {
yield put(A.fetchBuyQuoteLoading())

// paymentMethodId is required when profile=SIMPLEBUY and paymentMethod=BANK_TRANSFER
const { amount, pair, paymentMethod, paymentMethodId } = payload
const pairReversed = reversePair(pair)

// paymentMethodId is required when profile=SIMPLEBUY and paymentMethod=BANK_TRANSFER
const buyQuotePaymentMethodId =
paymentMethod === BSPaymentTypes.BANK_TRANSFER ? paymentMethodId : undefined

const quote: ReturnType<typeof api.getBuyQuote> = yield call(
api.getBuyQuote,
pairReversed,
'SIMPLEBUY',
amount,
paymentMethod,
paymentMethodId
buyQuotePaymentMethodId
)

yield put(
Expand Down

0 comments on commit c1acefe

Please sign in to comment.