@btc-vision/transaction 1.0.107 → 1.0.108

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.
@@ -1 +1 @@
1
- export declare const version = "1.0.107";
1
+ export declare const version = "1.0.108";
package/build/_version.js CHANGED
@@ -1 +1 @@
1
- export const version = '1.0.107';
1
+ export const version = '1.0.108';
@@ -41,10 +41,11 @@ export class UnisatSigner extends CustomKeypair {
41
41
  return this._network;
42
42
  }
43
43
  get unisat() {
44
- if (!window.unisat) {
45
- throw new Error('Unisat extension not found');
44
+ const module = window.opnet || window.unisat;
45
+ if (!module) {
46
+ throw new Error('OPWallet extension not found');
46
47
  }
47
- return window.unisat;
48
+ return module;
48
49
  }
49
50
  async init() {
50
51
  if (this.isInitialized) {
@@ -103,10 +103,9 @@ export class SharedInteractionTransaction extends TransactionBuilder {
103
103
  }
104
104
  try {
105
105
  transaction.finalizeInput(0, this.customFinalizer);
106
- this.log(`Finalized input 0!`);
107
106
  }
108
107
  catch (e) {
109
- console.log(`Failed to finalize input 0: ${e.stack}`);
108
+ this.error(`Failed to finalize input 0: ${e.stack}`);
110
109
  }
111
110
  for (let i = 0; i < txs.length; i++) {
112
111
  try {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@btc-vision/transaction",
3
3
  "type": "module",
4
- "version": "1.0.107",
4
+ "version": "1.0.108",
5
5
  "author": "BlobMaster41",
6
6
  "description": "OPNet transaction library allows you to create and sign transactions for the OPNet network.",
7
7
  "engines": {
package/src/_version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '1.0.107';
1
+ export const version = '1.0.108';
@@ -75,11 +75,12 @@ export class UnisatSigner extends CustomKeypair {
75
75
  }
76
76
 
77
77
  public get unisat(): Unisat {
78
- if (!window.unisat) {
79
- throw new Error('Unisat extension not found');
78
+ const module = window.opnet || window.unisat;
79
+ if (!module) {
80
+ throw new Error('OPWallet extension not found');
80
81
  }
81
82
 
82
- return window.unisat;
83
+ return module;
83
84
  }
84
85
 
85
86
  public async init(): Promise<void> {
@@ -204,10 +204,8 @@ export abstract class SharedInteractionTransaction<
204
204
 
205
205
  try {
206
206
  transaction.finalizeInput(0, this.customFinalizer);
207
-
208
- this.log(`Finalized input 0!`);
209
207
  } catch (e) {
210
- console.log(`Failed to finalize input 0: ${(e as Error).stack}`);
208
+ this.error(`Failed to finalize input 0: ${(e as Error).stack}`);
211
209
  }
212
210
 
213
211
  for (let i = 0; i < txs.length; i++) {