mirror of
https://github.com/status-im/status-web.git
synced 2025-01-12 13:44:39 +00:00
send request on creating account
This commit is contained in:
parent
1b89774ad1
commit
d4fb2e4d95
@ -91,11 +91,10 @@ class Client {
|
|||||||
await this.waku.stop()
|
await this.waku.stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
public createAccount = (): Account => {
|
public createAccount = async (): Promise<Account> => {
|
||||||
this.account = new Account()
|
this.account = new Account()
|
||||||
|
|
||||||
// TODO: joining part of creation of an account
|
await this.community.requestToJoin()
|
||||||
// await this.community.requestToJoin()
|
|
||||||
|
|
||||||
return this.account
|
return this.account
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@ import type { Account } from '@status-im/js'
|
|||||||
export const useAccount = () => {
|
export const useAccount = () => {
|
||||||
const { client, account, dispatch } = useProtocol()
|
const { client, account, dispatch } = useProtocol()
|
||||||
|
|
||||||
const createAccount = () => {
|
const createAccount = async () => {
|
||||||
const account = client.createAccount()
|
const account = await client.createAccount()
|
||||||
dispatch({ type: 'SET_ACCOUNT', account })
|
dispatch({ type: 'SET_ACCOUNT', account })
|
||||||
// TODO: save account
|
// TODO: save account
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user