frontend: unify vendor iframe shell behavior#3914
Merged
thisconnect merged 1 commit intoBitBoxSwiss:masterfrom Apr 7, 2026
Merged
frontend: unify vendor iframe shell behavior#3914thisconnect merged 1 commit intoBitBoxSwiss:masterfrom
thisconnect merged 1 commit intoBitBoxSwiss:masterfrom
Conversation
thisconnect
requested changes
Mar 16, 2026
Collaborator
thisconnect
left a comment
There was a problem hiding this comment.
Nice, this is indeed a bit repeated code.
Please split into two separate commits, each should add a hook one for resizing the height and the other for managing the terms.
0c81c61 to
0069e20
Compare
0069e20 to
934a2e9
Compare
Contributor
Author
|
@thisconnect moving this out from drafts, rebased |
thisconnect
requested changes
Mar 30, 2026
thisconnect
requested changes
Mar 30, 2026
| switch (message.type) { | ||
| case V0MessageType.RequestAddress: | ||
| if (!signing) { | ||
| if (!signingRef.current) { |
Collaborator
There was a problem hiding this comment.
note: signing got refacotored to ref, but looks good
934a2e9 to
1fa84af
Compare
Collaborator
|
Looks good, please squash |
Extract vendor widget resize/height handling and disclaimer terms state into reusable hooks and use them across market offerings and the Bitsurance widget to remove duplicated iframe shell logic.
1fa84af to
e65ff06
Compare
thisconnect
approved these changes
Apr 7, 2026
Collaborator
thisconnect
left a comment
There was a problem hiding this comment.
tested macOS & Android LGTM thanks
| }, 200); | ||
| }; | ||
| const { containerRef, height, iframeLoaded, onIframeLoad } = useVendorIframeResizeHeight(); | ||
| const { agreedTerms, setAgreedTerms } = useVendorTerms(!!config?.frontend?.skipMoonpayDisclaimer); |
Collaborator
There was a problem hiding this comment.
In the future after we have PR: #3916
we could only pass the string of the key in the config 'skipMoonpayDisclaimer'
and let the hook access config directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract shared iframe shell logic into a reusable hook and adopt it across market and bitsurance vendor widgets. This removes duplicated resize/load/terms state handling and stabilizes signing guards in iframe message flows.
cc @thisconnect