Skip to content

Commit

Permalink
Add transative methods for starting and stopping device polling
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing committed Jun 11, 2022
1 parent 9a87fac commit afc89c0
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,34 @@ class LedgerBridgeKeyring extends EventEmitter {
})
}

startConnectionPolling() {
return new Promise((resolve, reject) => {
this._sendMessage({
action: 'ledger-start-polling',
}, ({ success, error }) => {
if (success) {
resolve(true)
} else {
reject(error)
}
})
})
}

stopConnectionPolling() {
return new Promise((resolve, reject) => {
this._sendMessage({
action: 'ledger-stop-polling',
}, ({ success, error }) => {
if (success) {
resolve(true)
} else {
reject(error)
}
})
})
}

updateTransportMethod (transportType) {
return new Promise((resolve, reject) => {
// If the iframe isn't loaded yet, let's store the desired transportType value and
Expand Down

0 comments on commit afc89c0

Please sign in to comment.