mirror of
https://github.com/Permissionless-Software-Foundation/ipfs-bch-wallet-consumer.git
synced 2026-09-21 16:52:03 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b23d00ffe | ||
|
|
53cd4650bd | ||
|
|
d734a754d6 | ||
|
|
d4863e7d7d | ||
|
|
e6941f7f7f | ||
|
|
4fdf35a55f |
Generated
+7
-7
@@ -14,7 +14,7 @@
|
||||
"axios": "0.21.1",
|
||||
"bcryptjs": "2.4.3",
|
||||
"glob": "7.1.6",
|
||||
"ipfs-coord": "6.7.5",
|
||||
"ipfs-coord": "6.7.6",
|
||||
"jsonrpc-lite": "2.2.0",
|
||||
"jsonwebtoken": "8.5.1",
|
||||
"jwt-bch-lib": "1.3.0",
|
||||
@@ -9611,9 +9611,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ipfs-coord": {
|
||||
"version": "6.7.5",
|
||||
"resolved": "http://94.130.170.209:4873/ipfs-coord/-/ipfs-coord-6.7.5.tgz",
|
||||
"integrity": "sha512-CwsitrjROTV0YF+H6pasR+K2AcWyJMhOLMdLLmm8e6a6kL3NShUUcOQ8lgLiPLM8qbfQF/B+cPaXW0aVyOxqWg==",
|
||||
"version": "6.7.6",
|
||||
"resolved": "http://94.130.170.209:4873/ipfs-coord/-/ipfs-coord-6.7.6.tgz",
|
||||
"integrity": "sha512-Uif7Th0+jMb6E7/LhALgpuVFHNV2jlRWzOW8T/u9AuF83CyiHFZJIgJY06pd/TH6r7wH2VUahrrcCOlxgiQJQg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "0.21.4",
|
||||
@@ -33139,9 +33139,9 @@
|
||||
}
|
||||
},
|
||||
"ipfs-coord": {
|
||||
"version": "6.7.5",
|
||||
"resolved": "http://94.130.170.209:4873/ipfs-coord/-/ipfs-coord-6.7.5.tgz",
|
||||
"integrity": "sha512-CwsitrjROTV0YF+H6pasR+K2AcWyJMhOLMdLLmm8e6a6kL3NShUUcOQ8lgLiPLM8qbfQF/B+cPaXW0aVyOxqWg==",
|
||||
"version": "6.7.6",
|
||||
"resolved": "http://94.130.170.209:4873/ipfs-coord/-/ipfs-coord-6.7.6.tgz",
|
||||
"integrity": "sha512-Uif7Th0+jMb6E7/LhALgpuVFHNV2jlRWzOW8T/u9AuF83CyiHFZJIgJY06pd/TH6r7wH2VUahrrcCOlxgiQJQg==",
|
||||
"requires": {
|
||||
"axios": "0.21.4",
|
||||
"bch-encrypt-lib": "2.0.0",
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
"axios": "0.21.1",
|
||||
"bcryptjs": "2.4.3",
|
||||
"glob": "7.1.6",
|
||||
"ipfs-coord": "6.7.5",
|
||||
"ipfs-coord": "6.7.6",
|
||||
"jsonrpc-lite": "2.2.0",
|
||||
"jsonwebtoken": "8.5.1",
|
||||
"jwt-bch-lib": "1.3.0",
|
||||
|
||||
@@ -51,7 +51,10 @@ class IpfsCoordAdapter {
|
||||
|
||||
// Periodically poll services for available wallet service providers.
|
||||
this.pollBchServiceInterval = setInterval(this.pollForBchServices, 10000)
|
||||
this.pollP2wdbServiceInterval = setInterval(this.pollForP2wdbServices, 11000)
|
||||
this.pollP2wdbServiceInterval = setInterval(
|
||||
this.pollForP2wdbServices,
|
||||
11000
|
||||
)
|
||||
|
||||
// State object. TODO: Make this more robust.
|
||||
this.state = {
|
||||
@@ -169,7 +172,7 @@ class IpfsCoordAdapter {
|
||||
// to the preferred provider when it's discovered.
|
||||
if (
|
||||
_this.config.preferredP2wdbProvider &&
|
||||
thisPeer === _this.config.preferredP2wdbProvider
|
||||
thisPeer === _this.config.preferredP2wdbProvider
|
||||
) {
|
||||
_this.state.selectedP2wdbProvider = thisPeer
|
||||
}
|
||||
@@ -187,8 +190,15 @@ class IpfsCoordAdapter {
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
// catch and handle known failure mode.
|
||||
if (
|
||||
err.message.includes("Cannot read property 'peerList' of undefined")
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
console.error('Error in pollForP2wdbServices()')
|
||||
throw err
|
||||
// Do not throw error. This is a top-level function.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,6 +269,13 @@ class IpfsCoordAdapter {
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
// catch and handle known failure mode.
|
||||
if (
|
||||
err.message.includes("Cannot read property 'peerList' of undefined")
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
console.error('Error in pollForBchServices(): ', err)
|
||||
// Do not throw error. This is a top-level function.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user