@carrot-protocol/boost-http-client 0.3.1-http-print1-dev-89d812a → 0.3.2-accrue-bank-interest-dev-f444a3c

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.
package/dist/index.js CHANGED
@@ -78,6 +78,8 @@ class Client {
78
78
  if (this.dryRun) {
79
79
  // for debugging purposes only
80
80
  console.log("unsigedBase64Tx", unsignedBase64Tx);
81
+ console.log("dry run enabled, exiting before sending tx");
82
+ return "";
81
83
  }
82
84
  // deserialize into tx obj
83
85
  const txBytes = Buffer.from(unsignedBase64Tx, "base64");
@@ -93,12 +95,7 @@ class Client {
93
95
  txns: [encodedAndSignedTx],
94
96
  };
95
97
  // send to api
96
- if (!this.dryRun) {
97
- await handleApiCall(() => this.http.post(`send`, sendRequest));
98
- }
99
- else {
100
- console.warn("dry run enabled, did not send tx");
101
- }
98
+ await handleApiCall(() => this.http.post(`send`, sendRequest));
102
99
  // return txsig
103
100
  return bs58_1.default.encode(txSig);
104
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carrot-protocol/boost-http-client",
3
- "version": "0.3.1-http-print1-dev-89d812a",
3
+ "version": "0.3.2-accrue-bank-interest-dev-f444a3c",
4
4
  "description": "HTTP client for Carrot Boost",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -83,6 +83,8 @@ export class Client {
83
83
  if (this.dryRun) {
84
84
  // for debugging purposes only
85
85
  console.log("unsigedBase64Tx", unsignedBase64Tx);
86
+ console.log("dry run enabled, exiting before sending tx");
87
+ return "";
86
88
  }
87
89
 
88
90
  // deserialize into tx obj
@@ -105,11 +107,7 @@ export class Client {
105
107
  };
106
108
 
107
109
  // send to api
108
- if (!this.dryRun) {
109
- await handleApiCall(() => this.http.post(`send`, sendRequest));
110
- } else {
111
- console.warn("dry run enabled, did not send tx");
112
- }
110
+ await handleApiCall(() => this.http.post(`send`, sendRequest));
113
111
 
114
112
  // return txsig
115
113
  return encode.encode(txSig);