@stellar-broker/client 0.6.2 → 0.6.3

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/package.json +1 -1
  2. package/src/mediator.js +7 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellar-broker/client",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Client library for StellarBroker service",
5
5
  "author": "team@stellar.broker",
6
6
  "homepage": "https://stellar.broker",
package/src/mediator.js CHANGED
@@ -4,7 +4,7 @@ import {convertToStellarAsset} from './asset.js'
4
4
  import {AuthorizationWrapper} from './authorization.js'
5
5
 
6
6
  //additional XLM amount to cover tx fees
7
- const feesReserve = '2'
7
+ const feesReserve = '3'
8
8
 
9
9
  export class Mediator {
10
10
  /**
@@ -173,10 +173,12 @@ export class Mediator {
173
173
  }
174
174
  }))
175
175
  //create trustline for buying asset
176
- ops.push(Operation.changeTrust({
177
- source: this.mediatorAddress,
178
- asset: buyingAsset
179
- }))
176
+ if (!buyingAsset.isNative()) {
177
+ ops.push(Operation.changeTrust({
178
+ source: this.mediatorAddress,
179
+ asset: buyingAsset
180
+ }))
181
+ }
180
182
  //confirm tx
181
183
  await this.buildAndSend(sourceAccount, ops)
182
184
  //store the record in the localStorage