-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
Deploying with Cloudflare Pages
|
39cba2d
to
d44d952
Compare
@samsiegart |
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.
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", |
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.
Good riddance hehe
@@ -31,7 +35,6 @@ const App = () => { | |||
width="200" | |||
/> | |||
</a> | |||
<WalletBridge /> |
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.
Doubleplus good riddance
chainConnection.watcher.rpcAddr | ||
); | ||
console.debug('swingset params', params); | ||
setFee(BigInt(params.params.powerFlagFees[0].fee[0].amount)); |
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.
Another use case for theOne
. Let's look for these through the dapps once we have that.
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.
In this instance at least we handle the error gracefully on line 103
|
||
export type SwingsetParams = { foo: string }; | ||
|
||
const feeDenom = 10n ** 6n; |
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.
Can't we get this from vstorage?
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 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 }; |
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.
Foo?
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.
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.
@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. |
fixes #91
Live demo: https://remove-wallet-bridge.dapp-psm.pages.dev/