New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@omisego/omg-js-childchain

Package Overview
Dependencies
Maintainers
5
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@omisego/omg-js-childchain - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

6

package.json
{
"name": "@omisego/omg-js-childchain",
"version": "1.0.0",
"version": "1.1.0",
"description": "Module to interact with OMG ChildChain",

@@ -25,3 +25,3 @@ "keywords": [

"dependencies": {
"@omisego/omg-js-util": "^1.0.0",
"@omisego/omg-js-util": "^1.1.0",
"debug": "^4.0.1",

@@ -35,3 +35,3 @@ "json-bigint": "^0.3.0",

},
"gitHead": "05a32e8de40322603167499e80453596038370d2"
"gitHead": "09e36e667d11af23eb8b449a0a54f71b428340dc"
}

@@ -126,3 +126,3 @@ /*

/**
* Submit a signed transaction to the childchain
* Submit a signed transaction to the watcher
*

@@ -135,3 +135,3 @@ * @method submitTransaction

// validateTxBody(transactionBody)
return rpcApi.post(`${this.childChainUrl}/transaction.submit`, {
return rpcApi.post(`${this.watcherUrl}/transaction.submit`, {
transaction: transaction.startsWith('0x') ? transaction : `0x${transaction}`

@@ -152,3 +152,3 @@ })

*/
async sendTransaction (fromAddress, fromUtxos, fromPrivateKeys, toAddress, toAmount) {
async sendTransaction (fromAddress, fromUtxos, fromPrivateKeys, toAddress, toAmount, currency) {
validateAddress(fromAddress)

@@ -159,3 +159,3 @@ validateAddress(toAddress)

// create the transaction body
const txBody = transaction.createTransactionBody(fromAddress, fromUtxos, toAddress, toAmount)
const txBody = transaction.createTransactionBody(fromAddress, fromUtxos, toAddress, toAmount, currency)
// create transaction

@@ -162,0 +162,0 @@ const unsignedTx = this.createTransaction(txBody)

@@ -148,25 +148,2 @@ const ChildChain = require('../src')

})
it('should fail to create a transaction with mixed currencies', () => {
const txBody = {
'inputs': [
{
'txindex': 0,
'oindex': 0,
'currency': '0000000000000000000000000000000000000000',
'blknum': 19774001,
'amount': 1000000000000000000
},
{
'txindex': 0,
'oindex': 0,
'currency': '0000000000000000000000999999999999999999',
'blknum': 19774001,
'amount': 1000000000000000000
}
],
'outputs': []
}
return assert.throws(() => childChain.createTransaction(txBody), InvalidArgumentError, /Cannot mix currencies/)
})
})
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