psffpp 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +12 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -30,6 +30,12 @@ class PSFFPP {
30
30
  throw new Error('Instance of minimal-slp-wallet must be passed in as a property called \'wallet\', when initializing the psf-multisig-approval library.')
31
31
  }
32
32
 
33
+ // Allow user to pass in alternative IPFS gateway.
34
+ this.ipfsGateway = localConfig.ipfsGateway
35
+ if (!this.ipfsGateway) {
36
+ this.ipfsGateway = 'https://free-bch.fullstack.cash'
37
+ }
38
+
33
39
  // Encapsulate dependencies
34
40
  this.bchjs = this.wallet.bchjs
35
41
  this.ps009 = null // placeholder for Multisig Approval library.
@@ -52,7 +58,12 @@ class PSFFPP {
52
58
  // initialized.
53
59
  async _initPs009 () {
54
60
  if (!this.ps009) {
55
- this.ps009 = new MultisigApproval({ wallet: this.wallet })
61
+ const inObj = {
62
+ wallet: this.wallet,
63
+ ipfsGateway: this.ipfsGateway
64
+ }
65
+ // console.log('inObj: ', inObj)
66
+ this.ps009 = new MultisigApproval(inObj)
56
67
  }
57
68
 
58
69
  return true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "psffpp",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "PS010 PSF File Pinning Protocol",
5
5
  "main": "index.js",
6
6
  "type": "module",