[fix] expectedPubkey
This commit is contained in:
@@ -8,7 +8,7 @@ export interface Conf {
|
|||||||
|
|
||||||
export interface ConfWS2P {
|
export interface ConfWS2P {
|
||||||
address: string
|
address: string
|
||||||
expectedKey: string
|
expectedPubkey: string
|
||||||
salt: string
|
salt: string
|
||||||
passwd: string
|
passwd: string
|
||||||
currency: string
|
currency: string
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export function ws2pWatcher(conf: Conf) {
|
|||||||
connectionTimeout: conf.connectionTimeout,
|
connectionTimeout: conf.connectionTimeout,
|
||||||
requestTimeout: 0 // No request anyway
|
requestTimeout: 0 // No request anyway
|
||||||
},
|
},
|
||||||
wserver.expectedKey
|
wserver.expectedPubkey
|
||||||
)
|
)
|
||||||
|
|
||||||
await c.connectAsInitiator()
|
await c.connectAsInitiator()
|
||||||
@@ -42,20 +42,18 @@ export function ws2pWatcher(conf: Conf) {
|
|||||||
|
|
||||||
conf.reconnectionDelays,
|
conf.reconnectionDelays,
|
||||||
|
|
||||||
mail.onEstablished(conf, wserver.expectedKey),
|
mail.onEstablished(conf, wserver.expectedPubkey),
|
||||||
|
|
||||||
// When a disconnection is detected
|
// When a disconnection is detected
|
||||||
mail.onDisconnect(conf, wserver.expectedKey),
|
mail.onDisconnect(conf, wserver.expectedPubkey),
|
||||||
|
|
||||||
async () => {
|
async () => {
|
||||||
console.log('Trying to connect to %s', wserver.expectedKey)
|
console.log('Trying to connect to %s', wserver.expectedPubkey)
|
||||||
},
|
},
|
||||||
|
|
||||||
mail.onRestartSuccess(conf, wserver.expectedKey),
|
mail.onRestartSuccess(conf, wserver.expectedPubkey),
|
||||||
|
|
||||||
async (e) => {
|
mail.onError(conf, wserver.expectedPubkey)
|
||||||
console.error(e)
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user