@connext/types
Advanced tools
Comparing version 0.0.22 to 0.1.0
@@ -98,3 +98,3 @@ this.window = this.window || {}; | ||
function convertAssetAmountWithId(to, obj) { | ||
const asset = Object.assign(Object.assign({}, obj), { assetId: makeChecksumOrEthAddress(obj.assetId) }); | ||
const asset = Object.assign({}, obj, { assetId: makeChecksumOrEthAddress(obj.assetId) }); | ||
return convertAssetAmount(to, asset); | ||
@@ -114,3 +114,3 @@ } | ||
function convertSwapParameters(to, obj) { | ||
const asset = Object.assign(Object.assign({}, obj), { fromAssetId: makeChecksumOrEthAddress(obj.fromAssetId), toAssetId: makeChecksumOrEthAddress(obj.toAssetId) }); | ||
const asset = Object.assign({}, obj, { fromAssetId: makeChecksumOrEthAddress(obj.fromAssetId), toAssetId: makeChecksumOrEthAddress(obj.toAssetId) }); | ||
return convertAmountField(to, asset); | ||
@@ -128,3 +128,3 @@ } | ||
function convertAppState(to, obj) { | ||
return Object.assign(Object.assign({}, obj), { transfers: [convertAmountField(to, obj.transfers[0]), convertAmountField(to, obj.transfers[1])] }); | ||
return Object.assign({}, obj, { transfers: [convertAmountField(to, obj.transfers[0]), convertAmountField(to, obj.transfers[1])] }); | ||
} | ||
@@ -131,0 +131,0 @@ const convert = { |
@@ -100,3 +100,3 @@ import { AddressZero } from 'ethers/constants'; | ||
function convertAssetAmountWithId(to, obj) { | ||
const asset = Object.assign(Object.assign({}, obj), { assetId: makeChecksumOrEthAddress(obj.assetId) }); | ||
const asset = Object.assign({}, obj, { assetId: makeChecksumOrEthAddress(obj.assetId) }); | ||
return convertAssetAmount(to, asset); | ||
@@ -116,3 +116,3 @@ } | ||
function convertSwapParameters(to, obj) { | ||
const asset = Object.assign(Object.assign({}, obj), { fromAssetId: makeChecksumOrEthAddress(obj.fromAssetId), toAssetId: makeChecksumOrEthAddress(obj.toAssetId) }); | ||
const asset = Object.assign({}, obj, { fromAssetId: makeChecksumOrEthAddress(obj.fromAssetId), toAssetId: makeChecksumOrEthAddress(obj.toAssetId) }); | ||
return convertAmountField(to, asset); | ||
@@ -130,3 +130,3 @@ } | ||
function convertAppState(to, obj) { | ||
return Object.assign(Object.assign({}, obj), { transfers: [convertAmountField(to, obj.transfers[0]), convertAmountField(to, obj.transfers[1])] }); | ||
return Object.assign({}, obj, { transfers: [convertAmountField(to, obj.transfers[0]), convertAmountField(to, obj.transfers[1])] }); | ||
} | ||
@@ -133,0 +133,0 @@ const convert = { |
@@ -101,3 +101,3 @@ 'use strict'; | ||
function convertAssetAmountWithId(to, obj) { | ||
const asset = Object.assign(Object.assign({}, obj), { assetId: makeChecksumOrEthAddress(obj.assetId) }); | ||
const asset = Object.assign({}, obj, { assetId: makeChecksumOrEthAddress(obj.assetId) }); | ||
return convertAssetAmount(to, asset); | ||
@@ -117,3 +117,3 @@ } | ||
function convertSwapParameters(to, obj) { | ||
const asset = Object.assign(Object.assign({}, obj), { fromAssetId: makeChecksumOrEthAddress(obj.fromAssetId), toAssetId: makeChecksumOrEthAddress(obj.toAssetId) }); | ||
const asset = Object.assign({}, obj, { fromAssetId: makeChecksumOrEthAddress(obj.fromAssetId), toAssetId: makeChecksumOrEthAddress(obj.toAssetId) }); | ||
return convertAmountField(to, asset); | ||
@@ -131,3 +131,3 @@ } | ||
function convertAppState(to, obj) { | ||
return Object.assign(Object.assign({}, obj), { transfers: [convertAmountField(to, obj.transfers[0]), convertAmountField(to, obj.transfers[1])] }); | ||
return Object.assign({}, obj, { transfers: [convertAmountField(to, obj.transfers[0]), convertAmountField(to, obj.transfers[1])] }); | ||
} | ||
@@ -134,0 +134,0 @@ const convert = { |
@@ -99,3 +99,3 @@ import { AddressZero } from "ethers/constants"; | ||
export function convertAssetAmountWithId(to, obj) { | ||
const asset = Object.assign(Object.assign({}, obj), { assetId: makeChecksumOrEthAddress(obj.assetId) }); | ||
const asset = Object.assign({}, obj, { assetId: makeChecksumOrEthAddress(obj.assetId) }); | ||
return convertAssetAmount(to, asset); | ||
@@ -115,3 +115,3 @@ } | ||
export function convertSwapParameters(to, obj) { | ||
const asset = Object.assign(Object.assign({}, obj), { fromAssetId: makeChecksumOrEthAddress(obj.fromAssetId), toAssetId: makeChecksumOrEthAddress(obj.toAssetId) }); | ||
const asset = Object.assign({}, obj, { fromAssetId: makeChecksumOrEthAddress(obj.fromAssetId), toAssetId: makeChecksumOrEthAddress(obj.toAssetId) }); | ||
return convertAmountField(to, asset); | ||
@@ -129,3 +129,3 @@ } | ||
export function convertAppState(to, obj) { | ||
return Object.assign(Object.assign({}, obj), { transfers: [convertAmountField(to, obj.transfers[0]), convertAmountField(to, obj.transfers[1])] }); | ||
return Object.assign({}, obj, { transfers: [convertAmountField(to, obj.transfers[0]), convertAmountField(to, obj.transfers[1])] }); | ||
} | ||
@@ -132,0 +132,0 @@ export const convert = { |
{ | ||
"name": "@connext/types", | ||
"version": "0.0.22", | ||
"version": "0.1.0", | ||
"description": "TypeScript typings for common Connext types", | ||
@@ -19,11 +19,11 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@connext/messaging": "0.0.22", | ||
"@connext/messaging": "0.1.0", | ||
"@counterfactual/types": "0.0.39", | ||
"@types/jest": "24.0.18", | ||
"jest": "24.9.0", | ||
"rollup": "1.21.2", | ||
"rollup-plugin-typescript2": "0.24.1", | ||
"ts-jest": "24.0.2", | ||
"typescript": "3.6.3" | ||
"rollup": "1.21.4", | ||
"rollup-plugin-typescript2": "0.24.2", | ||
"ts-jest": "24.1.0", | ||
"typescript": "3.5.3" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
227584