-
Notifications
You must be signed in to change notification settings - Fork 212
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
Wallet UI working with new Smart Wallet contract #6134
Conversation
9b85ce3
to
708972f
Compare
ab040e8
to
494c540
Compare
1e9e464
to
1c69784
Compare
1c69784
to
0afcac4
Compare
70ab19a
to
6d73875
Compare
/** @type {number} */ | ||
let firstHeight; | ||
for await (const { blockHeight } of iterateReverse(follower)) { | ||
// TODO: Only set firstHeight and break if the value contains all our state. |
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.
How do we tell when we get to a snapshot block?
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.
They don't exist yet, which is why we only have this comment to describe what the code should eventually do.
6d73875
to
195058f
Compare
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 looked at it by commit; the code looks fine, but I haven't tested that it works.
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.
LGTM!
@@ -122,6 +122,7 @@ scenario2-setup-nobuild: | |||
$(AGCH) --home=t1/bootstrap keys add bootstrap --keyring-backend=test | |||
$(AGCH) --home=t1/bootstrap keys show -a bootstrap --keyring-backend=test > t1/bootstrap-address | |||
$(AGCH) --home=t1/n0 add-genesis-account `cat t1/bootstrap-address` $(BOOT_COINS) | |||
# Create |
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.
???
|
||
|
||
# Send some USDC to the vbank/provision module account where it can be traded for IST. | ||
fund-provision-pool: wait-for-cosmos |
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.
👍 ty
idea: make fund-acct
depend on this having run. E.g. make this have a side-effect of noting its completion and have fund-acct
depend on that, so that it runs if necesssary..
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.
copied to 8fa8326
@@ -9,7 +9,7 @@ import { observeIteration, subscribeEach } from '@agoric/notifier'; | |||
* If this proves to be a problem we can add an option to this or a related | |||
* utility to reset state from RPC. | |||
* | |||
* @param {ERef<StoredSubscriber<import('./smartWallet').UpdateRecord>>} updates | |||
* @param {ERef<Subscriber<import('./smartWallet').UpdateRecord>>} updates |
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.
👍 this doesn't care about storage
@@ -1,6 +1,6 @@ | |||
import bundleCentralSupply from '@agoric/vats/bundles/bundle-centralSupply.js'; | |||
import bundleMintHolder from '@agoric/vats/bundles/bundle-mintHolder.js'; | |||
import bundleWalletFactory from '@agoric/vats/bundles/bundle-legacy-walletFactory.js'; | |||
import bundleWalletFactory from '@agoric/vats/bundles/bundle-walletFactory.js'; |
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.
We have a yarn build
for this package now that builds ../bundles/bundle-walletFactory.js
.
Consider using that instead, so while making changes to this package you don't have to build all vats.
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 lean toward: you can assume yarn build
is up-to-date for other packages, but changes within a package should get bundled at test-time within a package. So this one is a little awkward: it depends on yarn build
in vats
whenever a change to the walletFactory contract in this package is changed.
hm. not sure I have a concrete suggestion.
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.
by that principle shouldn't this be as suggested?
import bundleWalletFactory from '@agoric/vats/bundles/bundle-walletFactory.js'; | |
import bundleWalletFactory from '../bundles/bundle-walletFactory.js'; |
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.
yes, that's good, provided the test.before()
auto-updates that bundle.
@@ -62,7 +62,7 @@ const ConnectionSettingsDialog = ({ | |||
const classes = useStyles(); | |||
const smartConnectionHrefs = allConnectionConfigs.map(({ href }) => href); | |||
|
|||
const [config, setConfig] = useState(connectionConfig); | |||
const [config, setConfig] = useState(connectionConfig || {}); |
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.
better to express defaults in the params
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 connectionConfig
may be falsy but not undefined
(such as when it's null
). I found it was necessary to handle all falsy values.
@@ -130,15 +130,80 @@ export const makeWalletBridgeFromFollower = ( | |||
]), | |||
); | |||
|
|||
// We assume just one cosmos purse per brand. |
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.
could ref #6126 (though I now see it is below)
brand: descriptor.brand, | ||
brandPetname: descriptor.petname, | ||
pursePetname: descriptor.petname, | ||
displayInfo: descriptor.displayInfo, |
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 intent might be more clear with destructring,
brand: descriptor.brand, | |
brandPetname: descriptor.petname, | |
pursePetname: descriptor.petname, | |
displayInfo: descriptor.displayInfo, | |
...descriptor |
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.
It's a remapping of properties, so I found following the current style was clearest for me.
currentAmount, | ||
value: currentAmount.value, |
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.
odd to have value
right next to an amount that has the same value. please remove the redundant one.
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 suspect it's an external design constraint; that is: removing the redundant one would involve something like upgrading all the dapps (or: the half of the dapps that use the one or the other).
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 found both were necessary.
99b9e1f
to
50ff847
Compare
closes (almost): #6127 (leave open until Product verifies)
Stacked on,
Description
Wallet UI has a WalletBackendAdapter for how the UI queries RPC nodes for data. That messaging system has changed with the new smart wallet and at least the adapter needs to be revised to match it.
Further changes may be warranted or necessary.
Security Considerations
Documentation Considerations
Testing Considerations