@tomo-inc/chains-service 0.0.21 → 0.0.22

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/dist/index.cjs CHANGED
@@ -4623,7 +4623,7 @@ var DogecoinService = class _DogecoinService extends BaseService {
4623
4623
  if (!spendableUtxos || spendableUtxos?.length === 0) {
4624
4624
  txData.spendableUtxos = await getSpendableUtxos(txData.from);
4625
4625
  }
4626
- const { psbtBase64, usingUtxos } = await createPsbt(txData);
4626
+ const { psbtBase64 } = await createPsbt(txData);
4627
4627
  const signedPsbt = await this.accountInfo.signTransaction(JSON.stringify({ psbtBase64 }));
4628
4628
  const signedTx = DogecoinUtils.extractPsbtTransaction(signedPsbt, 1e5);
4629
4629
  if (signedTx === "") {
@@ -4631,7 +4631,6 @@ var DogecoinService = class _DogecoinService extends BaseService {
4631
4631
  }
4632
4632
  try {
4633
4633
  const { txid } = await sendDogeTx(signedTx);
4634
- addUsedUtxos(usingUtxos);
4635
4634
  return { txId: txid };
4636
4635
  } catch (err) {
4637
4636
  throw new Error("Error: send transaction err." + JSON.stringify(err));
package/dist/index.js CHANGED
@@ -4615,7 +4615,7 @@ var DogecoinService = class _DogecoinService extends BaseService {
4615
4615
  if (!spendableUtxos || spendableUtxos?.length === 0) {
4616
4616
  txData.spendableUtxos = await getSpendableUtxos(txData.from);
4617
4617
  }
4618
- const { psbtBase64, usingUtxos } = await createPsbt(txData);
4618
+ const { psbtBase64 } = await createPsbt(txData);
4619
4619
  const signedPsbt = await this.accountInfo.signTransaction(JSON.stringify({ psbtBase64 }));
4620
4620
  const signedTx = DogecoinUtils.extractPsbtTransaction(signedPsbt, 1e5);
4621
4621
  if (signedTx === "") {
@@ -4623,7 +4623,6 @@ var DogecoinService = class _DogecoinService extends BaseService {
4623
4623
  }
4624
4624
  try {
4625
4625
  const { txid } = await sendDogeTx(signedTx);
4626
- addUsedUtxos(usingUtxos);
4627
4626
  return { txId: txid };
4628
4627
  } catch (err) {
4629
4628
  throw new Error("Error: send transaction err." + JSON.stringify(err));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomo-inc/chains-service",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "author": "tomo.inc",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -15,7 +15,7 @@ import { DogeTxData } from "./type";
15
15
  import * as utils from "./utils";
16
16
 
17
17
  import { BaseConfig } from "./config";
18
- import { addUsedUtxos, createPsbt, toBitcoin } from "./utils";
18
+ import { createPsbt, toBitcoin } from "./utils";
19
19
 
20
20
  export class DogecoinService extends BaseService {
21
21
  private static instance: DogecoinService;
@@ -204,8 +204,9 @@ export class DogecoinService extends BaseService {
204
204
  if (!spendableUtxos || spendableUtxos?.length === 0) {
205
205
  txData.spendableUtxos = await API.getSpendableUtxos(txData.from);
206
206
  }
207
+ // const { psbtBase64, usingUtxos } = await createPsbt(txData as any);
208
+ const { psbtBase64 } = await createPsbt(txData as any);
207
209
 
208
- const { psbtBase64, usingUtxos } = await createPsbt(txData as any);
209
210
  const signedPsbt = await this.accountInfo.signTransaction(JSON.stringify({ psbtBase64 }));
210
211
  const signedTx = DogecoinUtils.extractPsbtTransaction(signedPsbt, 100000);
211
212
 
@@ -214,7 +215,7 @@ export class DogecoinService extends BaseService {
214
215
  }
215
216
  try {
216
217
  const { txid } = await API.sendDogeTx(signedTx);
217
- addUsedUtxos(usingUtxos);
218
+ // addUsedUtxos(usingUtxos);
218
219
  return { txId: txid };
219
220
  } catch (err) {
220
221
  throw new Error("Error: send transaction err." + JSON.stringify(err));