@dfns/lib-stellar 0.4.3-alpha.2 → 0.5.0

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 +5 -5
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -21,7 +21,7 @@ class DfnsWallet {
21
21
  constructor(metadata, options) {
22
22
  this.metadata = metadata;
23
23
  this.dfnsClient = options.dfnsClient;
24
- this.network = metadata.network === 'Stellar' ? stellar_sdk_1.Networks.PUBLIC : stellar_sdk_1.Networks.TESTNET;
24
+ this.network = metadata.network === "Stellar" ? stellar_sdk_1.Networks.PUBLIC : stellar_sdk_1.Networks.TESTNET;
25
25
  }
26
26
  static async init(options) {
27
27
  const { walletId, dfnsClient } = options;
@@ -41,7 +41,7 @@ class DfnsWallet {
41
41
  return this.metadata.address;
42
42
  }
43
43
  async sign(transaction) {
44
- const isFeeBump = 'innerTransaction' in transaction;
44
+ const isFeeBump = "innerTransaction" in transaction;
45
45
  const res = await this.dfnsClient.wallets.generateSignature({
46
46
  walletId: this.metadata.id,
47
47
  body: {
@@ -53,9 +53,9 @@ class DfnsWallet {
53
53
  if (!res.signedData) {
54
54
  throw new sdk_1.DfnsError(-1, 'signature missing', res);
55
55
  }
56
- return isFeeBump
57
- ? new stellar_sdk_1.FeeBumpTransaction(hexToBase64(res.signedData), this.network)
58
- : new stellar_sdk_1.Transaction(hexToBase64(res.signedData), this.network);
56
+ return isFeeBump ?
57
+ new stellar_sdk_1.FeeBumpTransaction(hexToBase64(res.signedData), this.network) :
58
+ new stellar_sdk_1.Transaction(hexToBase64(res.signedData), this.network);
59
59
  }
60
60
  }
61
61
  exports.DfnsWallet = DfnsWallet;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@dfns/lib-stellar",
3
- "version": "0.4.3-alpha.2",
3
+ "version": "0.5.0",
4
4
  "peerDependencies": {
5
5
  "@stellar/stellar-sdk": "^11.0.0",
6
- "@dfns/sdk": "0.4.3-alpha.2"
6
+ "@dfns/sdk": "0.5.0"
7
7
  },
8
8
  "dependencies": {
9
9
  "buffer": "6.0.3",