@cityofzion/bs-neo-legacy 1.10.5 → 1.10.7

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.
@@ -189,19 +189,16 @@ class BSNeoLegacy {
189
189
  if (!BSNeoLegacyHelper_1.BSNeoLegacyHelper.isMainnet(this.network)) {
190
190
  throw new Error('Must use Mainnet network');
191
191
  }
192
- if (!neoLegacyMigrationAmounts.hasEnoughGasBalance || !neoLegacyMigrationAmounts.gasBalance) {
193
- throw new Error('Must have at least 0.1 GAS');
194
- }
195
- if (!neoLegacyMigrationAmounts.hasEnoughNeoBalance || !neoLegacyMigrationAmounts.neoBalance) {
196
- throw new Error('Must have at least 2 NEO');
192
+ if (!neoLegacyMigrationAmounts.hasEnoughGasBalance && !neoLegacyMigrationAmounts.hasEnoughNeoBalance) {
193
+ throw new Error('Must have at least 0.1 GAS or 2 NEO');
197
194
  }
198
195
  const { neonJsAccount, signingCallback } = yield __classPrivateFieldGet(this, _BSNeoLegacy_instances, "m", _BSNeoLegacy_generateSigningCallback).call(this, account);
199
196
  const provider = new neon_js_1.api.neoCli.instance(this.network.url);
200
197
  const intents = [];
201
198
  if (neoLegacyMigrationAmounts.gasBalance)
202
- intents.push(...neon_js_1.api.makeIntent({ [this.GAS_ASSET.symbol]: Number(neoLegacyMigrationAmounts.gasBalance.amount) }, BSNeoLegacyConstants_1.BSNeoLegacyConstants.MIGRATION_COZ_NEO3_ADDRESS));
199
+ intents.push(...neon_js_1.api.makeIntent({ [this.GAS_ASSET.symbol]: Number(neoLegacyMigrationAmounts.gasBalance.amount) }, BSNeoLegacyConstants_1.BSNeoLegacyConstants.MIGRATION_COZ_LEGACY_ADDRESS));
203
200
  if (neoLegacyMigrationAmounts.neoBalance)
204
- intents.push(...neon_js_1.api.makeIntent({ [this.NEO_ASSET.symbol]: Number(neoLegacyMigrationAmounts.neoBalance.amount) }, BSNeoLegacyConstants_1.BSNeoLegacyConstants.MIGRATION_COZ_NEO3_ADDRESS));
201
+ intents.push(...neon_js_1.api.makeIntent({ [this.NEO_ASSET.symbol]: Number(neoLegacyMigrationAmounts.neoBalance.amount) }, BSNeoLegacyConstants_1.BSNeoLegacyConstants.MIGRATION_COZ_LEGACY_ADDRESS));
205
202
  const response = yield neon_js_1.api.sendAsset({
206
203
  url: this.network.url,
207
204
  api: provider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-neo-legacy",
3
- "version": "1.10.5",
3
+ "version": "1.10.7",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Coz",