Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@omisego/omg-js-utxo-merge

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@omisego/omg-js-utxo-merge - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

25

index.js

@@ -20,3 +20,3 @@

console.log(`Merging ${utxos.length} utxos of ${currency}`)
const submitted = await Promise.all(mergeUtxos(utxos,
let submitted = await Promise.all(mergeUtxos(utxos,
currency,

@@ -28,2 +28,5 @@ address,

// Filter out failed transactions
submitted = submitted.filter(utxo => utxo.result)
// We can use the results of the submitted transactions to construct

@@ -58,6 +61,18 @@ // utxos before they're put into blocks and continue the merging process.

// Submit each signed transaction
return signed.map(async (tx) => ({
result: await submitFunc(tx.signed),
value: tx.value
}))
return signed.map(async (tx) => {
let result
try {
result = await submitFunc(tx.signed)
} catch (err) {
if (err.code.includes('submit:fees_not_covered')) {
console.warn(`Cannot automatically merge ${currency} tokens.`)
} else {
console.error(`Error merging: ${err}`)
}
}
return {
result,
value: tx.value
}
})
}

@@ -64,0 +79,0 @@

2

package.json
{
"name": "@omisego/omg-js-utxo-merge",
"version": "1.0.0",
"version": "1.0.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -15,3 +15,3 @@ # omg-js-utxo-merge

const childChain = new ChildChain('http://watcher-staging.omg.network/')
const childChain = new ChildChain('http://watcher.ari.omg.network/')

@@ -18,0 +18,0 @@ function signTransaction (unsignedTx, numUtxos, address) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc