Skip to content
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

Set Pending state on Deep Link action #519

Merged
merged 2 commits into from
May 15, 2024
Merged

Set Pending state on Deep Link action #519

merged 2 commits into from
May 15, 2024

Conversation

loneil
Copy link
Contributor

@loneil loneil commented May 14, 2024

The Deep Link when clicked was opening the pres req on the BC Wallet but leaving the button enabled. This can cause the issue discussed here
bcgov/bc-wallet-mobile#1956 (comment)

Change it to set the deep link button to disabled (Pending status triggered manually, since it's not updating on the server when deep link is used, no callback)

See comments for relevant changes in html file, diff is big because there was a extraneous div ending that was breaking prettier so I fixed that and formatted.

Signed-off-by: Lucas ONeil <lucasoneil@gmail.com>
Comment on lines 389 to 390
deepLinkOpen() {
state.disableDeeplink = true;
this.setUiStates("pending");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set Deep Link pending status

Comment on lines 400 to 411
setUiStates(status) {
state.current = status;
state.showSpinner = status === "pending";
state.showScanned = ["pending", "verified"].includes(status);
state.showRefresh = ["abandoned", "expired", "failed"].includes(
status
);
state.disableDeeplink = [
"abandoned",
"expired",
"pending",
"success",
].includes(status);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor to be called from multiple spots

});
this.socket.on("status", (data) => {
console.log("Toggling state", data.status);
this.setUiStates(data.status);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor to be called from multiple spots

Signed-off-by: Lucas ONeil <lucasoneil@gmail.com>

tweak

Signed-off-by: Lucas ONeil <lucasoneil@gmail.com>
@esune esune merged commit e56dd6e into main May 15, 2024
5 checks passed
@esune esune deleted the bugfix/deepLinkDisable branch May 15, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants