-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
There exists a condition in which a bug can happen here:
https://github.com/bpanel-org/bpanel/blob/development/server/bcoinRouter.js#L24
If the request times out on the back end, the token is not reset
For the wallet, we could do something like:
let wallet = client.wallet(id, token)
wallet.request(...)But that wouldn't work with the node client, as it wouldn't have a wallet method.
Maybe we can create a new and temporary client with something like:
// inject(Client)
let newclient = client.inject(client)
newclient.token = token
newclient.request(...)or
// inject(Client, opts {})
let specialized = client.inject(client, { id, token })
// returns client.wallet() or client.node()
// that comes from a new client instanceMaybe inject is a static method that returns a new instance of the client?
Would have to reference client.prototype to be able to reach the method then I believe
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels