@rosen-bridge/abstract-extractor 0.1.1 → 0.1.2-7aba94c9

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.
@@ -19,17 +19,21 @@ export class NodeNetwork extends AbstractNetwork {
19
19
  * @param box
20
20
  * @returns ErgoBox
21
21
  */
22
- convertToErgoBox = async (box: IndexedErgoBox): Promise<ErgoBox> => ({
23
- transactionId: box.transactionId || '',
24
- index: box.index || 0,
25
- value: box.value || 0n,
26
- ergoTree: box.ergoTree || '',
27
- creationHeight: box.creationHeight || 0,
28
- assets: box.assets || [],
29
- additionalRegisters: box.additionalRegisters,
30
- boxId: box.boxId || '',
31
- blockId: (await this.getTxBlock(box.transactionId!)).hash,
32
- });
22
+ convertToErgoBox = async (box: IndexedErgoBox): Promise<ErgoBox> => {
23
+ const tx = await this.getTxBlock(box.transactionId!);
24
+ return {
25
+ transactionId: box.transactionId || '',
26
+ index: box.index || 0,
27
+ value: box.value || 0n,
28
+ ergoTree: box.ergoTree || '',
29
+ creationHeight: box.creationHeight || 0,
30
+ assets: box.assets || [],
31
+ additionalRegisters: box.additionalRegisters,
32
+ boxId: box.boxId || '',
33
+ blockId: tx.hash,
34
+ spentTransactionId: box.spentTransactionId,
35
+ };
36
+ };
33
37
 
34
38
  /**
35
39
  * return block information of specified tx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rosen-bridge/abstract-extractor",
3
- "version": "0.1.1",
3
+ "version": "0.1.2-7aba94c9",
4
4
  "description": "Rosen Bridge extractor interfaces to work with scanner",
5
5
  "repository": "",
6
6
  "license": "GPL-3.0",