Skip to content

Commit

Permalink
fix: force trpc subscribe using apply
Browse files Browse the repository at this point in the history
  • Loading branch information
bluecco committed Apr 8, 2024
1 parent 8195d06 commit 9b1f1a1
Showing 1 changed file with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,24 @@ export const getWebWalletStarknetObject = async (

if (iframeProps) {
const { iframe, modal } = iframeProps
proxyLink.updateModal.subscribe(undefined, {
onData(modalEvent: ModalEvents) {
switch (modalEvent.action) {
case "show":
showModal(modal)
break
case "hide":
hideModal(modal)
break
case "updateHeight":
setIframeHeight(iframe, modalEvent.height)
}

proxyLink.updateModal.subscribe.apply(null, [
undefined,
{
onData(modalEvent: ModalEvents) {
switch (modalEvent.action) {
case "show":
showModal(modal)
break
case "hide":
hideModal(modal)
break
case "updateHeight":
setIframeHeight(iframe, modalEvent.height)
}
},
},
})
])
}

return starknetWindowObject
Expand Down

0 comments on commit 9b1f1a1

Please sign in to comment.