Skip to content

Conversation

@rafinskipg
Copy link
Collaborator

@rafinskipg rafinskipg commented Nov 19, 2025

Listens to the event returned by wallet-service when a user reached spending limits and renders a modal.

In future PRs we will:

  • handle the continue button of the modal
  • adjust the rendered contents to display app name and amount consumed
image

@rafinskipg rafinskipg changed the title wip: Notify of spending limits UI feat: Notify of spending limits UI Nov 20, 2025
@rafinskipg rafinskipg requested a review from a team November 25, 2025 09:30
Copy link
Contributor

@iamacook iamacook left a comment

Choose a reason for hiding this comment

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

The UI code is duplicated for React and Native. Can we dedupe that and/or the providers with core React logic?

Copy link
Collaborator

@jkadamczyk jkadamczyk left a comment

Choose a reason for hiding this comment

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

Left mostly nits around some cleanup, otherwise looks good!

@rafinskipg rafinskipg enabled auto-merge (squash) December 3, 2025 09:27
@rafinskipg rafinskipg requested a review from jkadamczyk December 3, 2025 09:29
iamacook
iamacook previously approved these changes Dec 3, 2025
jkadamczyk
jkadamczyk previously approved these changes Dec 3, 2025
@rafinskipg rafinskipg dismissed stale reviews from jkadamczyk and iamacook via f84e20b December 3, 2025 12:03
iamacook
iamacook previously approved these changes Dec 3, 2025
…ithub.com:phantom/wallet-sdk into rafael/wp-7764-ui-show-error-user-reached-warning
@rafinskipg rafinskipg requested a review from iamacook December 4, 2025 15:37
…ithub.com:phantom/wallet-sdk into rafael/wp-7764-ui-show-error-user-reached-warning
Comment on lines +37 to +39
if (isAxiosError(error)) {
return error.message || fallbackMessage;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is redundant because of getAxiosErrorData.

Comment on lines +228 to +229
// Also check error.response?.data for manually mocked errors in tests
const errorData = data || ((error as any)?.response?.data as PrepareErrorResponse | undefined);
Copy link
Contributor

Choose a reason for hiding this comment

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

We should not be handling test code in production.

Comment on lines +22 to +35
console.error("No auth provider found in user session");
return;
}

setIsLoggingOut(true);
try {
// Disconnect first
await disconnect();
// Then connect again with the same provider
await connect({ provider: authProvider });
// Close the modal after successful reconnection
onClose();
} catch (error) {
console.error("Error during logout and login:", error);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we logging in production? Shouldn't we be using our logger?

@rafinskipg rafinskipg closed this Dec 9, 2025
auto-merge was automatically disabled December 9, 2025 14:21

Pull request was closed

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.

4 participants