@btc-vision/btc-runtime 1.9.5 → 1.9.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@btc-vision/btc-runtime",
3
- "version": "1.9.5",
3
+ "version": "1.9.6",
4
4
  "description": "Bitcoin Smart Contract Runtime",
5
5
  "main": "btc/index.ts",
6
6
  "scripts": {
@@ -24,13 +24,7 @@ import { IOP721 } from './interfaces/IOP721';
24
24
  import { OP721InitParameters } from './interfaces/OP721InitParameters';
25
25
  import { ReentrancyGuard } from './ReentrancyGuard';
26
26
  import { StoredMapU256 } from '../storage/maps/StoredMapU256';
27
- import {
28
- ApprovedEvent,
29
- ApprovedForAllEvent,
30
- MAX_URI_LENGTH,
31
- TransferredEvent,
32
- URIEvent,
33
- } from '../events/predefined';
27
+ import { ApprovedEvent, ApprovedForAllEvent, MAX_URI_LENGTH, TransferredEvent, URIEvent, } from '../events/predefined';
34
28
  import {
35
29
  ON_OP721_RECEIVED_SELECTOR,
36
30
  OP712_DOMAIN_TYPE_HASH,
@@ -780,6 +774,7 @@ export abstract class OP721 extends ReentrancyGuard implements IOP721 {
780
774
  const newIndex = tokenArray.getLength();
781
775
  tokenArray.push(tokenId);
782
776
  this.tokenIndexMap.set(tokenId, u256.fromU32(newIndex));
777
+ tokenArray.save();
783
778
  }
784
779
 
785
780
  protected _removeTokenFromOwnerEnumeration(from: Address, tokenId: u256): void {
@@ -804,6 +799,8 @@ export abstract class OP721 extends ReentrancyGuard implements IOP721 {
804
799
  // Remove last element
805
800
  tokenArray.deleteLast();
806
801
  this.tokenIndexMap.delete(tokenId);
802
+
803
+ tokenArray.save();
807
804
  }
808
805
 
809
806
  /**