Merge branch 'main' into feat/ts-support
This commit is contained in:
@@ -79,7 +79,7 @@ export interface IState {
|
||||
splits: {
|
||||
[id: string]: SplitSize
|
||||
}
|
||||
client: XrplClient | null
|
||||
client: XrplClient
|
||||
clientStatus: 'offline' | 'online'
|
||||
mainModalOpen: boolean
|
||||
mainModalShowed: boolean
|
||||
@@ -114,7 +114,7 @@ let initialState: IState = {
|
||||
tabSize: 2
|
||||
},
|
||||
splits: {},
|
||||
client: null,
|
||||
client: undefined!, // set below only.
|
||||
clientStatus: 'offline' as 'offline',
|
||||
mainModalOpen: false,
|
||||
mainModalShowed: false,
|
||||
@@ -154,9 +154,9 @@ const state = proxy<IState>({
|
||||
})
|
||||
// Initialize socket connection
|
||||
const client = new XrplClient(`wss://${process.env.NEXT_PUBLIC_TESTNET_URL}`)
|
||||
state.client = ref(client);
|
||||
|
||||
client.on('online', () => {
|
||||
state.client = ref(client)
|
||||
state.clientStatus = 'online'
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user