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

Display smart account address on permission modal with eoa wallet add… #441

Closed
wants to merge 1 commit into from

Conversation

Bacis
Copy link
Contributor

@Bacis Bacis commented Feb 1, 2024

Screenshot 2024-02-01 at 14 10 08

On requested permission modal, in case there's a smart account deployed, display its address right under the wallet address.

Copy link

vercel bot commented Feb 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
decentralized-relay-app ✅ Ready (Inspect) Visit Preview Feb 1, 2024 1:53pm
decentralized-relay-wallet ✅ Ready (Inspect) Visit Preview Feb 1, 2024 1:53pm
malicious-dapp-verify-simulation ✅ Ready (Inspect) Visit Preview Feb 1, 2024 1:53pm
react-auth-dapp ✅ Ready (Inspect) Visit Preview Feb 1, 2024 1:53pm
react-auth-wallet ✅ Ready (Inspect) Visit Preview Feb 1, 2024 1:53pm
react-dapp-v2 ✅ Ready (Inspect) Visit Preview Feb 1, 2024 1:53pm
react-wallet-v2 ✅ Ready (Inspect) Visit Preview Feb 1, 2024 1:53pm
vue-dapp-auth ✅ Ready (Inspect) Visit Preview Feb 1, 2024 1:53pm
3 Ignored Deployments
Name Status Preview Updated (UTC)
react-dapp-v2-cosmos-provider ⬜️ Ignored (Inspect) Feb 1, 2024 1:53pm
react-dapp-v2-with-ethers ⬜️ Ignored (Inspect) Feb 1, 2024 1:53pm
react-dapp-v2-with-web3js ⬜️ Ignored (Inspect) Feb 1, 2024 1:53pm

@Bacis Bacis requested review from tomiir and ganchoradkov February 1, 2024 14:01
@tomiir
Copy link
Contributor

tomiir commented Feb 1, 2024

Looks good, but I'd check #441 first since it has some changes that would make this a bit simpler.
I had already worked a bit on this screen so it might get conflicts, let me know if you need any help 🙏
@Bacis

Copy link
Member

@ganchoradkov ganchoradkov left a comment

Choose a reason for hiding this comment

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

💯

const pKey = eip155Wallets[getAddress(chain?.namespace) as `0x${string}`].getPrivateKey() as `0x${string}`
const smartAccountClient = new SmartAccountLib(pKey, enabledChain as SmartAccountEnabledChains)

smartAccountClient.getSmartAccountAddress().then(res => {
Copy link
Member

Choose a reason for hiding this comment

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

is there a chance that getSmartAccountAddress fails for some reason?
Simple catch and log of the error might prevent it causing issues with other functionality in the wallet

@Bacis Bacis closed this Feb 2, 2024
@Bacis Bacis deleted the feat/add-smart-account-on-permission-modal branch February 2, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants