Skip to content

Commit

Permalink
update response type
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariflo committed Feb 22, 2024
1 parent 2ab0dbd commit eb9e0ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/@magic-sdk/provider/src/core/view-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export abstract class ViewController {
});

this.on(MagicIncomingWindowMessage.MAGIC_SEND_PRODUCT_TYPE, (event: MagicMessageEvent) => {
if (event.data.response.product_type === 'connect') {
if (event.data.response.result.product_type === 'connect') {
createDeprecationWarning({
method: 'Usage of Universal Wallet API Keys',
removalVersions: UniversalWalletRemovalVersions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ test('Receive MAGIC_SEND_PRODUCT_TYPE with product_type "connect", call `createD
window.postMessage(
{
msgType: MSG_TYPES().MAGIC_SEND_PRODUCT_TYPE,
response: {
product_type: 'connect',
},
response: { result: { product_type: 'connect' } },
},
'*',
);
Expand Down

0 comments on commit eb9e0ed

Please sign in to comment.