Description
With https://github.com/Geo-Web-Project/cadastre/issues/400, users will create or sign in to the Cadastre with a "Signer" account. This is intended to be paired with a Safe "Smart Account" for an account abstracted setup even if the user used a legacy EOA to sign-in. If the user's "Signer" account doesn't have a Safe associated with it, we need the user to pre-fund it, create it, and pay for the gas.
Funding can be from a fiat-to-crypto onramp or through an ETH transfer. For the hackathon, we'll just focus on direct ETH funding. Onramp functionality can be listed as "Coming Soon."
*Requirements
Show a module shown after the "Signer" account creation/first EOA sign-in, requesting that the user fund their target Safe address
Don't show this module after sign-in if the Safe already exists. Future designs will also allow the user to select from a list of Safes if they have more than one.
Always display the (target) Safe address in the Cadastre header and the profile page rather than the EOA signer
After the target Safe address has been funded with ETH, prompt the user to create their Safe using the Safe Core SDK
Utilize Relay Kit and Gelato's SyncFee to fund the gas required to initialize the Safe from the Safe itself
Make this "Add Funds" UI module available from the user dashboard and transaction windows
Show the Add Funds module when the user clicks on their account address in the header if they haven't yet initialized their Safe instead of the full profile modal
Update the "Insufficient ETHx" warning message/logic to be shown if the user hasn't initialized their Safe and/or doesn't have enough ETH+ETHx balance to complete the transaction:
"Insufficient Funds - Click Add Funds above and send ETH to your account to complete your transaction"
After the Safe is created/funded the first time, only the functions/information pertaining to sending funds to the Safe are needed.
Description With https://github.com/Geo-Web-Project/cadastre/issues/400, users will create or sign in to the Cadastre with a "Signer" account. This is intended to be paired with a Safe "Smart Account" for an account abstracted setup even if the user used a legacy EOA to sign-in. If the user's "Signer" account doesn't have a Safe associated with it, we need the user to pre-fund it, create it, and pay for the gas.
Funding can be from a fiat-to-crypto onramp or through an ETH transfer. For the hackathon, we'll just focus on direct ETH funding. Onramp functionality can be listed as "Coming Soon."
*Requirements
Add Funds
module when the user clicks on their account address in the header if they haven't yet initialized their Safe instead of the full profile modal