-
Notifications
You must be signed in to change notification settings - Fork 2
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: refactor onboarding #478
feat: refactor onboarding #478
Conversation
…ID for contract details link
… for master safe and balance checks
…oved error handling and user feedback
const master = masterSafes.find( | ||
(safe) => safe.owner === WalletOwnerType.Master, | ||
); |
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.
masterSafes is pre-filtered
const master = masterSafes.find( | |
(safe) => safe.owner === WalletOwnerType.Master, | |
); | |
const master = masterSafes[0]; |
Co-authored-by: Josh Miller <31908788+truemiller@users.noreply.github.com>
}, | ||
}; | ||
|
||
export const SetupEoaFunding = () => { | ||
const { goto } = useSetup(); | ||
const { masterEoaAddress } = useWallet(); | ||
const { masterEoa } = useMasterWalletContext(); | ||
const { walletBalances } = useBalanceContext(); |
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 get masterWalletBalances
from useMasterBalances()
not a major issue for now though, this works fine
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.
nice, updated :)
Co-authored-by: Josh Miller <31908788+truemiller@users.noreply.github.com>
Co-authored-by: Josh Miller <31908788+truemiller@users.noreply.github.com>
@@ -24,14 +25,18 @@ export const MECHS: Mechs = { | |||
name: 'Agent Mech', | |||
contract: new MulticallContract( | |||
'0x77af31De935740567Cf4fF1986D04B2c964A786a', | |||
AGENT_MECH_ABI, | |||
AGENT_MECH_ABI.filter( |
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.
probably better to put on the ABI itself, but this is fine for now; no need for JsonFragment either, can use Abi from types
no 100%, but i don't think we'll ever need types like constructor, or event, for example 🤔
@@ -225,6 +234,12 @@ export const SetupEoaFunding = () => { | |||
goto(SetupScreen.SetupCreateSafe); | |||
}, 5000); | |||
|
|||
const eoaBalance = walletBalances.find((e) => e.isNative); |
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.
should we check here chainId as well? like the currentChain
or maybe even homeChainId
from selectedAgentConfig?
- probably can use useMasterBalances instead
…y-xyz/olas-operate-app into mohan/refactor-onboarding
4c80e72
into
refactor/multi-chain-support-frontend
Proposed changes
(The app is running after commenting out a lot of code.)
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that apply