@stellar-broker/client 0.6.5 → 0.6.6
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 +1 -1
- package/src/mediator.js +6 -3
- package/jest.config.cjs +0 -4
package/package.json
CHANGED
package/src/mediator.js
CHANGED
|
@@ -203,10 +203,10 @@ export class Mediator {
|
|
|
203
203
|
asset: buyingAsset
|
|
204
204
|
}))
|
|
205
205
|
}
|
|
206
|
-
//confirm tx
|
|
207
|
-
await this.buildAndSend(sourceAccount, ops)
|
|
208
206
|
//store the record in the localStorage
|
|
209
207
|
localStorage.setItem(this.storagePrefix + this.mediatorAddress, this.source)
|
|
208
|
+
//confirm tx
|
|
209
|
+
await this.buildAndSend(sourceAccount, ops)
|
|
210
210
|
//client will need mediator secret for trading
|
|
211
211
|
return this.mediator.secret()
|
|
212
212
|
}
|
|
@@ -222,8 +222,11 @@ export class Mediator {
|
|
|
222
222
|
}
|
|
223
223
|
//load account
|
|
224
224
|
let account = await this.loadAccount(address)
|
|
225
|
-
if (!account)
|
|
225
|
+
if (!account) {
|
|
226
|
+
//remove reference from local storage
|
|
227
|
+
localStorage.removeItem(this.storagePrefix + address)
|
|
226
228
|
throw new Error(`Mediator account ${address} doesn't exist on the ledger`)
|
|
229
|
+
}
|
|
227
230
|
|
|
228
231
|
if (!account.signers.find(s => s.key === this.source))
|
|
229
232
|
throw new Error(`${address} is not a mediator account for ${this.source}`)
|
package/jest.config.cjs
DELETED