Commit Graph

128 Commits

Author SHA1 Message Date
e975f4c9f7 Add copy button for mnemonic after creating new wallet (#13)
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Reviewed-on: cerc-io/laconic-wallet#13
2024-08-08 07:35:50 +00:00
4827fa8c7c Fix accounts order in namespaces object and prevent re-render from useEffect (#12)
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)
- Send namespaces object with correct accounts sequence while pairing with dApps

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Reviewed-on: cerc-io/laconic-wallet#12
2024-08-01 10:38:21 +00:00
36c3adb1b1 Upgrade registry-sdk version to 0.2.5 (#11)
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Reviewed-on: cerc-io/laconic-wallet#11
2024-07-30 13:32:32 +00:00
2ca91cad06 Replace photon with alnt for laconicd network (#10)
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Reviewed-on: cerc-io/laconic-wallet#10
2024-07-30 13:20:17 +00:00
eab4fd425a Add laconicd as a default network in wallet (#9)
Part of [laconicd testnet validator enrollment
](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Reviewed-on: cerc-io/laconic-wallet#9
2024-07-29 12:55:50 +00:00
361b79b696 Refactor wallet connect instance to use state variables (#8)
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)
- Refactor `web3wallet` variable into a state variable

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Co-authored-by: Adw8 <adwaitgharpure@gmail.com>
Reviewed-on: cerc-io/laconic-wallet#8
2024-07-29 12:13:15 +00:00
0bd9dec8a9 Upgrade registry-sdk package version to 0.2.3 (#7)
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

- Upgrade registry-sdk to include onboarding module changes

Co-authored-by: Adw8 <adwaitgharpure@gmail.com>
Reviewed-on: cerc-io/laconic-wallet#7
Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
2024-07-29 05:40:34 +00:00
c027f5b934 Hotfix to remove non-null assertion for WalletConnect instance (#6)
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675)

TODO:
- Refactor WalletConnect instance in laconic wallet to use state variables

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Reviewed-on: cerc-io/laconic-wallet#6
2024-07-26 12:17:28 +00:00
9f5f6c2361 Upgrade registry-sdk package version 2024-07-16 14:32:45 +05:30
Isha Venikar
40ccc4c333
Add spinner to Yes button in ApproveTransaction page (#122)
* Add spinner to Yes button

* Fix indentation

* Modify variable names

* Set isRequestAccepted to false
2024-07-16 09:54:49 +05:30
Adwait Gharpure
9fa39c48ee
Stop importing laconic client from registry-sdk/dist (#121) 2024-07-11 10:16:25 +05:30
Adwait Gharpure
d75260d3dc
Add polyfills for url and https packages (#120)
* Add polyfills for url and https packages

* Use http-browserify as polyfill
2024-07-09 14:36:59 +05:30
Adwait Gharpure
c3f9f7c245
Add support for rejecting transaction request (#119)
* Implement functionality to reject request

* Change button label
2024-07-08 16:40:16 +05:30
Adwait Gharpure
521776ea3e
Display account details in approve transaction page (#118)
* Display account in approve transaction page

* Change label
2024-07-05 15:48:08 +05:30
shreerang6921
2ccb396889
Show private key of selected account (#117)
* Display private key of selected account

* Update dialog box UI

* Refactor show private key dialog

* Refactor code to use context variables
2024-07-04 18:45:13 +05:30
Adwait Gharpure
83723d4086
Add support for sending cosmos transactions (#116)
* Update readme to contain instructions for creating  file

* Add method for sending transaction to chain

* Rename approve transaction component to approve transfer

* Create component for approving transactions

* Display transaction message in Approve transaction component

* Install registry-sdk

* Display gas limit on receiving transaction request

* Add functionality for sending transaction to chain

* Add memo in simulate gas method

* Remove unnecessary TODO

* Display error in dialog box

* Add support for onboarding transaction

* Pass address of signer in wallet connect request from app
2024-07-04 18:36:20 +05:30
shreerang6921
adf9efe6f8
Refactor wallet connect requests (#115)
* Refactor wallet connect requests

* Remove unnecessary data from constants

* Fix dependencies

* Update readme

* Handle review changes
2024-04-29 13:28:55 +05:30
shreerang6921
e98b1e1f8e Make gas values editable on approve transaction (#113)
* Make eth gas limit and gas price editable on approve transaction

* Make max fee and max priority fee editable for EIP 1559 supported chains

* Refactor approve transaction code

* Use gas limit from dapp if sent

* Refactor regex to constants file
2024-04-25 17:08:27 +05:30
IshaVenikar
820ac62615 Fix README (#114)
* Fix readme

* Remove fullstops and colons

* Don't link .env
2024-04-25 17:08:27 +05:30
shreerang6921
b05b5894b0 Handle incorrect RPC URL error and reject request (#112)
* Fix gas limit type for evm chains

* Handle incorrect rpc url error

* Fix edit network form not working for evm chains
2024-04-25 17:08:27 +05:30
shreerang6921
db0b21ddd1 Simulate gas limit for cosmos transactions (#111)
* Simulate gas limit for cosmos transactions

* Reject request if funds are not sufficient

* Fix submit button disable condition

* Dont estimate gas if funds are not sufficient for evm chains

* Handle review changes
2024-04-25 17:08:27 +05:30
shreerang6921
b1a0831e78 Take gas limit and fees values from user while approving transaction (#109)
* Take gas limit and fees from user

* Update text input ui

* Use gasPrice from networks data

* Use default gas limit from env

* Use default gas price if not found in registry

* Remove appended denom in gas price

* Use gas limit from env

* Show error dialog when transaction fails

* Calculate gas limit and gas price if not received from dapp

* Update example env

* Improve syntax

---------

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
2024-04-25 17:08:27 +05:30
IshaVenikar
ad202f46fc Fix Edit network form (#108)
* Make block explorer url optional

* Make review changes

* Remove log
2024-04-25 17:08:27 +05:30
IshaVenikar
6d80f64a10 Implement Edit network form (#107)
* Add edit network form

* Set selected network when networks are updated

* Disable buttons and add spinner after submitting

* Display previous values in Edit network form

* Use error msgs form constants file

* Reset default networks on reset
2024-04-25 17:08:27 +05:30
shreerang6921
8c0751f84b Add details to setup wallet connect in readme (#58)
* Add details to setup wallet connect in readme

* Add hyperlinks for wallet connect terms

* Handle review changes

* Add keystore data structure and troubleshooting steps in readme

* Update readme

* Add pre-commit lint hook

* Resolve linter warnings

* Handle review changes

* Fix heading level in readme
2024-04-25 17:08:27 +05:30
shreerang6921
1172e67f5f Remove configured networks on reset (#105) 2024-04-25 17:08:27 +05:30
IshaVenikar
cd03fb6e84 Add custom form validation messages (#106)
* Fix empty fields and url error msg

* Use constants for error msgs
2024-04-25 17:08:27 +05:30
IshaVenikar
455703f91c Display pop-up when chains are not supported (#103)
* Check for unsupported namespace

* Add check for common walletchains and networks chains

* Format code

* Display unsupported chains

* Display Dapp info in modal

* Refactor code

* Reject request if chains are not supported

* Reject sessions

* Remove isVisible state
2024-04-25 17:08:27 +05:30
shreerang6921
b9d3eef707 Send only network id and name to paired dApp (#104) 2024-04-25 17:08:27 +05:30
shreerang6921
e98dac7a5b Fix spinner not showing up on starting wallet (#102)
* Fix spinner not showing up on starting wallet

* Remove unnecessary dependancies
2024-04-25 17:08:27 +05:30
IshaVenikar
670d6f4a54 Add form validation for add network form (#101)
* Use zod for validation

* Return to index 0 after deleting network

* Make url optional

* Use form schema according to the selected nw

* Fix type for networks data

* Accept numeric value for coin type

* Fix form type issue
2024-04-25 17:08:27 +05:30
shreerang6921
b947dd1151 Use configured coin type for creating accounts (#100)
* Use configured coin type for creating accounts

* Resolve eslint warnings
2024-04-25 17:08:27 +05:30
IshaVenikar
2adfffba55 Reset Add Network form after switching the network (#97)
* Reset form upon switching nws

* Modify gitignore

* Fix undefined field error

* Add env steps in readme

* Remove .env file

* Fix indentation in readme

* Disable buttons while loading (#99)

* Disable buttons while loading

* Disable pairing modal button

* Format code
2024-04-25 17:08:27 +05:30
shreerang6921
15da99a827 Send back namespaces object based on chains requested by dApp (#94)
* Refactor pairing modal code

* Refactor update session code

* Reset state after session proposal is approved

* Refactor approve and update session

* Remove unused helper methods

* Remove completed todos
2024-04-25 17:08:27 +05:30
IshaVenikar
888302a0dd Auto-populate eth chain data from chain id (#96)
* Auto-populate eth data from json file

* Modify variable names

* Clear fields if chainId is not found

* Format code

* Fix indentation

* Use reset to clear values

* Exclude chain id while resetting

* Make review changes

* Fix format
2024-04-25 17:08:27 +05:30
IshaVenikar
33147bee0d Auto-populate cosmos chain details from chain id (#95)
* Autplopulate cosmos chain details from chain id

* Display rpc url

* Remove assert

* Make review changes

* Use watch to trigger function

* Use usewatch
2024-04-25 17:08:27 +05:30
IshaVenikar
e879fe8e46 Implement remove network functionality for added networks (#93)
* Set current network to ethereum after removing network

* Display confirm dialog after deleting network

---------

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
2024-04-25 17:08:27 +05:30
IshaVenikar
0707cd6fa4 Set coin type by default after selecting network (#90) 2024-04-25 17:08:27 +05:30
IshaVenikar
da4bed9c4b Send networks data to dapp (#87)
* Send networks data to dapp

* Reflect switching tabs in dapp dropdown

* Fix current network name not showing in Dapp

* Modify variable names

* Modify method and variable names

* Modify networks type

* Use selectedNetwork state and networkId

* Fix networks context states

* Add separate file for network methods
2024-04-25 17:08:27 +05:30
IshaVenikar
984cad8e48 Fix intents path to use namespace and chainId (#92) 2024-04-25 17:08:27 +05:30
shreerang6921
3809ce88b1 Update keystore data structure (#88)
* Update keystore data structure (#83)

* Update create wallet and retrieve accounts functionality for updated data structure

* Refactor accounts state

* Use constant variable for cosmos

* Update add accounts incrementally and with custom HD path for updated data structure (#85)

* Change data structure

* Reset wallet change

* Fix signEthMessage

* Fix sign request

* Fix pairing with laconic pay dApp and sending tokens

* Add accounts to configured networks

* Update add account from hd path flow

* Handle review changes

---------

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>

* Remove network type state

* Refactor create wallet code (#89)

* Refactor create wallet code

* Create cosmos accounts with correct address prefix

* Use networks data from state while creating wallet

* Refactor code and add network id in types (#91)

* Refactor add new networks component

* Add selected network state in context

* Remove returning account from create wallet

---------

Co-authored-by: IshaVenikar <145848618+IshaVenikar@users.noreply.github.com>
2024-04-25 17:08:27 +05:30
IshaVenikar
94bd8b6480 Persist network data (#84)
* Store new network data

* Store default networks in keystore (#86)

* Add default nws in keystore

* Fix duplicate networks

* Display correct currency symbols for eth and cosmos tx

* Fix currency display

* Use wei for eth
2024-04-25 17:08:27 +05:30
IshaVenikar
23fa5415ae Update namespace after adding network (#81)
* Update namespace

* Add eth accounts

* Add isSubmitted

* Send namespace to dApp based on selected network while pairing

* Send transactions on configured chain

* Fix modal UI

* Use namespace by default for chainId

* Use ethereum mainnet as default chain

* Use method names from constants file

* Combine required and optional namespaces

* Fix chainId

* Fix networksData

* Remove cosmos denom

* Remove todo

* Use lowercase denom

---------

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
2024-04-25 17:08:27 +05:30
shreerang6921
e4fe88939c Add support to configure networks (#76)
* Add support to configure cosmos networks

* Fix intents functionality for configured networks

* Add address prefix while initializing stargate client

* Remove unnecessary functions

* Update style for add network page

* Handle review changes

* Fix eth accounts not showing up on configured eth chain
2024-04-25 17:08:27 +05:30
shreerang6921
bdd1b58140 Fix sending transactions on default networks (#78)
* Add default values to networksData state

* Handle review changes

* Get default chains data from constants file
2024-04-25 17:08:27 +05:30
Adwait Gharpure
2e18397a95 Navigate to homescreen on approving sign request (#75)
* Navigate to homescreen on approving sign request

* Add spinner to button on approve

---------

Co-authored-by: Adw8 <adwait@deepstacksoft.com>
2024-04-25 17:08:27 +05:30
shreerang6921
703ea72c1f Add functionality to configure EVM networks (#74)
* Configure EVM networks

* Display added EVM networks in network drop down

* Add network for configured networks
2024-04-25 17:08:27 +05:30
IshaVenikar
0dea0082b4
Display buttons above scroll in laconic-wallet approve screens (#72)
* Buttons outside scroll

* Fix ui for signRequest page

* Remove todo
2024-04-01 18:00:40 +05:30
Adwait Gharpure
d50cfbfe84
Add support for displaying svg images (#71)
* Add support for SVG images

* Fix imports

---------

Co-authored-by: Adw8 <adwait@deepstacksoft.com>
2024-04-01 17:21:01 +05:30
IshaVenikar
ac18a43fab
Disable button for approve tx (#70) 2024-03-28 16:51:58 +05:30