@eluvio/elv-client-js 4.2.7 → 4.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eluvio/elv-client-js",
3
- "version": "4.2.7",
3
+ "version": "4.2.8",
4
4
  "description": "Javascript client for the Eluvio Content Fabric",
5
5
  "main": "src/index.js",
6
6
  "author": "Kevin Talmadge",
@@ -143,9 +143,15 @@ class AuthorizationClient {
143
143
  this.noCache = true;
144
144
  }
145
145
 
146
- if(channelAuth && this.client.signer && this.client.signer.remoteSigner) {
147
- // Channel auth not supported for remote signer, use a self-signed no-auth token instead
148
- return this.client.CreateFabricToken({context});
146
+ if(channelAuth && this.client.signer) {
147
+ const balance = Utils.ToBigNumber(
148
+ await this.client.GetBalance({address: this.client.CurrentAccountAddress()})
149
+ ).toFixed(3);
150
+
151
+ if(balance < 0.02) {
152
+ // Channel auth not supported for remote signer, use a self-signed no-auth token instead
153
+ return this.client.CreateFabricToken({context});
154
+ }
149
155
  }
150
156
 
151
157
  let authorizationToken;