Skip to content
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
5 changes: 4 additions & 1 deletion src/navigation/services/screens/BuyAndSellRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ const BuyAndSellRoot = ({
const user: User | undefined = useAppSelector(
({BITPAY_ID}) => BITPAY_ID.user[network],
);
const anonymousEid = useAppSelector(({APP}) => APP.brazeEid);
const userEid = user?.eid ?? anonymousEid;
const allRates = useAppSelector(({RATE}) => RATE.rates);
const accessTokenTransak: TransakAccessTokenData | undefined = useAppSelector(
({BUY_CRYPTO}) => BUY_CRYPTO.tokens?.transak?.[transakEnv],
Expand Down Expand Up @@ -2611,6 +2613,7 @@ const BuyAndSellRoot = ({
colorCode: Action,
theme: theme.dark ? 'dark' : 'light',
showWalletAddressForm: false,
externalCustomerId: userEid,
};

let _paymentMethod: MoonpayPaymentType | undefined =
Expand Down Expand Up @@ -3400,7 +3403,7 @@ const BuyAndSellRoot = ({
baseCurrencyAmount: offer.sellAmount || +curValRef.current,
externalTransactionId: externalTransactionId,
paymentMethod: getMoonpaySellPayoutMethodFormat(paymentMethod!.method),
externalCustomerId: user?.eid ?? selectedWallet.id,
externalCustomerId: userEid,
redirectURL:
APP_DEEPLINK_PREFIX +
`moonpay?flow=sell&externalId=${externalTransactionId}` +
Expand Down
15 changes: 15 additions & 0 deletions src/store/buy-crypto/buy-crypto.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,22 @@ export interface MoonpayGetSignedPaymentUrlReqData {
paymentMethod?: MoonpayPaymentType;
colorCode?: string;
theme?: 'dark' | 'light';
themeId?: string;
language?: string;
externalCustomerId?: string;
defaultCurrencyCode?: string;
walletAddressTag?: string;
walletAddresses?: string; // JSON string, e.g. {"btc":"...","eos":"..."}
walletAddressTags?: string; // JSON string, e.g. {"eos":"...","xrp":"..."}
quoteCurrencyAmount?: number;
contractAddress?: string; // Only supported for DeFi Buy integrations
networkCode?: string; // Only supported for DeFi Buy integrations
email?: string;
areFeesIncluded?: boolean;
showAllCurrencies?: boolean;
showOnlyCurrencies?: string;
unsupportedRegionRedirectUrl?: string;
skipUnsupportedRegionScreen?: boolean;
}

export interface MoonpayGetSignedPaymentUrlData {
Expand Down
6 changes: 6 additions & 0 deletions src/store/sell-crypto/models/moonpay-sell.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,16 @@ export interface MoonpayGetSellSignedPaymentUrlRequestData {
externalCustomerId?: string;
colorCode?: string;
theme?: 'dark' | 'light';
themeId?: string;
language?: string;
email?: string;
showWalletAddressForm?: boolean;
unsupportedRegionRedirectUrl?: string;
skipUnsupportedRegionScreen?: string;
defaultBaseCurrencyCode?: string;
quoteCurrencyAmount?: number;
refundWalletAddresses?: string; // JSON string, e.g. {"btc":"...","bch":"..."}
showAllCurrencies?: boolean;
}

export interface MoonpayGetSellSignedPaymentUrlData {
Expand Down
Loading