-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(content): dispatch load
event if wallet address is valid
#367
Conversation
Extension builds preview
|
8355b5c
to
7c7f142
Compare
`SPSP endpoint must be specified as ${spec}fully resolved https:// url, ` + | ||
`got ${JSON.stringify(pointerOrUrl)} ` | ||
url = new URL(walletAddressUrl) | ||
if (url.protocol !== 'https:') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (url.protocol !== 'https:') { | |
if (!ALLOWED_PROTOCOLS.includes(url.protocol)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wallet address should always be served under https:
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant if in dev we want to use a localhost Rafiki.
Context
Closes #365.
Changes proposed in this pull request
Initially I thought there was an error and the
load
event was not correctly dispatched. It looks like we omitted this. Now we dispatch theload
event if the wallet address is valid.Additional changes:
checkWalletAddressUrlFormat
function since we do not need to check for SPSP endpoints