Commit Graph
34 Commits
Author SHA1 Message Date
Sebastian Martinez be0ff349df Move signer into session store
The Metamask and WalletConnect signer are updated one any account
change, but currently we store them only in the static config object.
This commit moves this to the session store to improve this behaviour

Signed-off-by: Sebastian Martinez <sebastinez@me.com>
2022-05-20 13:10:53 +02:00
Sebastian Martinez a89e792aed Make SIWE session statement optional
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
2022-05-18 15:45:47 +02:00
Sebastian Martinez 6d5d508220 Improve loading and edge cases
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
2022-05-18 15:45:47 +02:00
Sebastian Martinez 5ef2b7512c Add authentication with seed nodes
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
2022-05-18 15:45:47 +02:00
Sebastian Martinez 3f28844dc8 Flatten session store
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
2022-05-18 15:45:47 +02:00
Sebastian Martinez e3de337769 Move reactive config part into session state
This PR moves the signer "clones" the signer property from the `Config`
object into the `session` state, to allow Svelte reactivity, e.g. in the
Testnet Faucet, where we rely on `config.signer` but since it only
changes when the `Config` object in `App.svelte` changes we can't react
on it.

For now I only cloned the signer property, if we see in the future that
there are other properties that need to change with session we can add
them.

Signed-off-by: Sebastian Martinez <sebastinez@me.com>
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2022-02-02 15:25:58 +01:00
Sebastian Martinez ea0e8bd3d3 Fix type errors
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
2022-02-02 12:29:20 +01:00
Sebastian Martinez c5172b8cc5 Allow WalletConnect to change accounts and network
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
2021-11-15 14:48:21 +01:00
Alexis Sellier 7c31daf56f Import types to not cause an issue with Vite 2021-09-14 14:26:31 +02:00
Alexis Sellier 8e081a7301 Fix metamask re-connection 2021-08-12 10:18:00 +02:00
Alexis Sellier d346f164b3 Improve walletconnect error message 2021-08-04 13:11:52 +02:00
Alexis Sellier f97bc5b5f2 Fix walletconnect rejection from mobile 2021-08-03 18:19:09 +02:00
Alexis SellierandNjoku Emmanuel 400a2df0a4 Add WalletConnect support
Co-authored-by: Njoku Emmanuel <kalunjoku123@gmail.com>
Signed-off-by: Alexis Sellier <self@cloudhead.io>
2021-08-03 16:25:16 +02:00
Alexis Sellier bf363d7c05 Use the configured signer, not the provider's 2021-07-26 17:06:27 +02:00
Alexis Sellier cb78b1f34f Don't display old balances
By storing the balance, we displayed stale data. This forces
the balance to be reloaded on refresh.
2021-06-26 10:41:25 +02:00
Sebastian Martinez dcdec8c8e1 Add IDX as user identity provider
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
2021-06-24 12:17:45 -03:00
Alexis Sellier 68dba2e862 Refresh balance on page load 2021-06-16 12:54:20 +02:00
Alexis Sellier ebf99178f4 Move rad token contract to config 2021-06-16 12:37:54 +02:00
Alexis Sellier 50d2bc944f [eslint] Add rules matching codebase style 2021-06-14 10:52:00 +02:00
Sebastian Martinez 7a130baa24 Refresh balance after network change
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
2021-06-14 10:19:38 +02:00
Alexis Sellier 0b6d60c69a Use semicolons to delimit interface members 2021-06-10 10:58:10 +02:00
Alexis Sellier 97d3ae0bfd Make sure all exported functions are typed 2021-06-10 10:55:13 +02:00
Alexis Sellier 34fdf88b84 Use 'const' instead of 'let' and use semicolons 2021-06-10 10:10:55 +02:00
Alexis Sellier fceffee48c Merge pull request #13 from sebastinez/sebastinez/store-session
Add session persistence
2021-06-09 15:16:54 +02:00
Sebastian Martinez d7b109d24f Add session persistence
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
2021-06-08 21:34:31 -03:00
Sebastian Martinez 442515f056 Validate network and reloads on change
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
2021-06-07 23:52:40 -03:00
Sebastian Martinez e664c241d3 Extract contract abis to config.json (#7) 2021-06-03 18:10:49 +02:00
Sebastian Martinez 30d969e3ac Handle wallet account change (#4) 2021-06-02 13:14:39 +02:00
Alexis Sellier 182acc31d1 Use Registrar::commitWithPermit
Allows us to skip the 'approve' transaction.
2021-05-14 14:58:20 +02:00
Alexis Sellier 8c623ceaed Get everything properly typed 2021-05-04 11:13:14 +02:00
Alexis Sellier 4ab188b6ed Move config to JSON, update tsconfig 2021-05-04 10:48:25 +02:00
Alexis Sellier 10e2847d5d Improve session code 2021-05-03 18:17:18 +02:00
Alexis Sellier e05b1356d8 Refactor app 2021-04-28 20:25:17 +02:00
Alexis Sellier a34b26384c Switch to TypeScript 2021-04-27 15:22:22 +02:00