@paypal/checkout-components 5.0.243 → 5.0.244
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -170,10 +170,14 @@ export function getCardConfig() : FundingSourceConfig {
|
|
|
170
170
|
|
|
171
171
|
WalletLabel,
|
|
172
172
|
|
|
173
|
-
showWalletMenu: ({ instrument }) => {
|
|
173
|
+
showWalletMenu: ({ instrument, userIDToken }) => {
|
|
174
174
|
if (instrument.branded) {
|
|
175
175
|
return false;
|
|
176
176
|
} else {
|
|
177
|
+
if (!instrument.tokenID?.match(/-/) && userIDToken) {
|
|
178
|
+
return false
|
|
179
|
+
}
|
|
180
|
+
|
|
177
181
|
return true;
|
|
178
182
|
}
|
|
179
183
|
}
|
package/src/funding/common.jsx
CHANGED
|
@@ -120,7 +120,7 @@ export type FundingSourceConfig = {|
|
|
|
120
120
|
logoColors : { [$Values<typeof BUTTON_COLOR>] : $Values<typeof LOGO_COLOR> },
|
|
121
121
|
shapes : $ReadOnlyArray<$Values<typeof BUTTON_SHAPE>>,
|
|
122
122
|
labelText? : string | (({| content : ?ContentType, fundingEligibility : ?FundingEligibilityType |}) => string),
|
|
123
|
-
showWalletMenu : ({| instrument : WalletInstrument |}) => boolean
|
|
123
|
+
showWalletMenu : ({| instrument : WalletInstrument, userIDToken : ?string |}) => boolean
|
|
124
124
|
|};
|
|
125
125
|
|
|
126
126
|
export function BasicLabel({ logo, label, period, locale: { lang } } : LabelOptions) : ChildType {
|
|
@@ -195,7 +195,7 @@ export function Button({ fundingSource, style, multiple, locale, env, fundingEli
|
|
|
195
195
|
isWallet = true;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
const shouldShowWalletMenu = isWallet && instrument && showWalletMenu({ instrument });
|
|
198
|
+
const shouldShowWalletMenu = isWallet && instrument && showWalletMenu({ instrument, userIDToken });
|
|
199
199
|
|
|
200
200
|
return (
|
|
201
201
|
<div
|