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

feat: remove wallet-app bridge #92

Merged
merged 3 commits into from
Sep 17, 2023
Merged

feat: remove wallet-app bridge #92

merged 3 commits into from
Sep 17, 2023

Conversation

samsiegart
Copy link
Collaborator

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 17, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 500367f
Status: ✅  Deploy successful!
Preview URL: https://ab8ef606.dapp-psm.pages.dev
Branch Preview URL: https://remove-wallet-bridge.dapp-psm.pages.dev

View logs

@otoole-brendan
Copy link

@samsiegart
image
Text change here: 'As an anti-spam measure, you will need 10BLD to fund it's provision which will be deposited to the community fund'

@otoole-brendan
Copy link

image

Text change: 'You will need 10BLD to fund it's provision which will be deposited to the community fund.'

image - isn't this an insufficent BLD funds message? Can we change to 'Insufficient BLD funds. Please ensure you have 10BLD and try again. ...agorxxxxx does not exist on chain'

Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

Huge improvement.
Some issues with robustness, particularly wrt denom rendering. I think we should revisit those but they're not blockers for this urgent PR.

@@ -6,7 +6,6 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"postinstall": "patch-package",
Copy link
Member

Choose a reason for hiding this comment

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

Good riddance hehe

@@ -31,7 +35,6 @@ const App = () => {
width="200"
/>
</a>
<WalletBridge />
Copy link
Member

Choose a reason for hiding this comment

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

Doubleplus good riddance

chainConnection.watcher.rpcAddr
);
console.debug('swingset params', params);
setFee(BigInt(params.params.powerFlagFees[0].fee[0].amount));
Copy link
Member

Choose a reason for hiding this comment

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

Another use case for theOne. Let's look for these through the dapps once we have that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In this instance at least we handle the error gracefully on line 103


export type SwingsetParams = { foo: string };

const feeDenom = 10n ** 6n;
Copy link
Member

Choose a reason for hiding this comment

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

Can't we get this from vstorage?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it should be available under published.agoricNames.vbankAsset although the wallet-app has the same logic as here. My assumption is that changing the actual denom would be a significant change that would allow for some lead time to update, but might be good to confirm that.

// Increment every time the current terms change.
export const currentTermsIndex = 1;

export type SwingsetParams = { foo: string };
Copy link
Member

Choose a reason for hiding this comment

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

Foo?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah yea, I was originally trying to pass in the whole params, and created this type before I knew how they were structured. I changed this to only pass in the amount value, and handle any parsing errors in ChainConnection.tsx where the params are loaded, so this is unused. Removed.

@samsiegart
Copy link
Collaborator Author

@otoole-brendan I updated the text as requested for the provisioning message. For the error message, that comes from Keplr before it even broadcasts the txn to the chain. It's difficult to make it user-friendly. We could have some logic that parses the text, tries to identify the error, and translates it into something more understandable, but that logic would break if Keplr ever changed the message themselves.

@samsiegart samsiegart merged commit 8dd128e into main Sep 17, 2023
2 checks passed
@samsiegart samsiegart deleted the remove-wallet-bridge branch September 17, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants