mirror of
https://github.com/jlengrand/adyen-web.git
synced 2026-03-10 08:01:22 +00:00
Fix: Loading logos when handling qrCode/await actions (#2490)
* fix: getting proper logos for actions * changeset
This commit is contained in:
committed by
GitHub
parent
daeb70504a
commit
d1c9282980
5
.changeset/fair-masks-attend.md
Normal file
5
.changeset/fair-masks-attend.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@adyen/adyen-web': patch
|
||||
---
|
||||
|
||||
Loading the logo images properly when handling qrCode/await actions
|
||||
@@ -239,7 +239,8 @@ export class UIElement<P extends UIElementProps = any> extends BaseElement<P> im
|
||||
* Get the element icon URL for the current environment
|
||||
*/
|
||||
get icon(): string {
|
||||
return this.props.icon ?? this.resources.getImage()(this.type);
|
||||
const type = this.props.paymentMethodType || this.type;
|
||||
return this.props.icon ?? this.resources.getImage()(type);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -211,7 +211,7 @@ class QRLoader extends Component<QRLoaderProps, QRLoaderState> {
|
||||
src={qrCodeImage}
|
||||
alt={i18n.get('wechatpay.scanqrcode')}
|
||||
onLoad={() => {
|
||||
onActionHandled({ componentType: this.props.type, actionDescription: 'qr-code-loaded' });
|
||||
onActionHandled?.({ componentType: this.props.type, actionDescription: 'qr-code-loaded' });
|
||||
}}
|
||||
/>
|
||||
|
||||
|
||||
@@ -158,6 +158,13 @@ export interface UIElementProps extends BaseElementProps {
|
||||
/** @internal */
|
||||
clientKey?: string;
|
||||
|
||||
/**
|
||||
* Returned after the payments call, when an action is returned. It represents the payment method tx variant
|
||||
* that was used for the payment
|
||||
* @internal
|
||||
*/
|
||||
paymentMethodType?: string;
|
||||
|
||||
/** @internal */
|
||||
elementRef?: any;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user