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

@wharfkit/antelope

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wharfkit/antelope - npm Package Compare versions

Comparing version 1.0.8-rc2 to 1.0.8

2

package.json
{
"name": "@wharfkit/antelope",
"description": "Library for working with Antelope powered blockchains.",
"version": "1.0.8-rc2",
"version": "1.0.8",
"homepage": "https://github.com/wharfkit/antelope",

@@ -6,0 +6,0 @@ "license": "BSD-3-Clause-No-Military-License",

@@ -65,2 +65,22 @@ import {ABISerializableObject} from '../serializer/serializable'

static formatUnits(units: Int64Type, precision: number) {
const digits = Int64.from(units).toString().split('')
let negative = false
if (digits[0] === '-') {
negative = true
digits.shift()
}
while (digits.length <= precision) {
digits.unshift('0')
}
if (precision > 0) {
digits.splice(digits.length - precision, 0, '.')
}
let rv = digits.join('')
if (negative) {
rv = '-' + rv
}
return rv
}
constructor(units: Int64, symbol: Asset.Symbol) {

@@ -85,20 +105,3 @@ this.units = units

get quantity(): string {
const digits = this.units.toString().split('')
let negative = false
if (digits[0] === '-') {
negative = true
digits.shift()
}
const p = this.symbol.precision
while (digits.length <= p) {
digits.unshift('0')
}
if (p > 0) {
digits.splice(digits.length - p, 0, '.')
}
let rv = digits.join('')
if (negative) {
rv = '-' + rv
}
return rv
return Asset.formatUnits(this.units, this.symbol.precision)
}

@@ -105,0 +108,0 @@

@@ -248,3 +248,7 @@ /**

}
throw new Error(`Unexpectedly encountered ${value} for non-optional`)
throw new Error(
`Unexpectedly encountered ${value} for non-optional (${ctx.codingPath
.map((path) => path.field)
.join('.')})`
)
} else if (type.isArray) {

@@ -251,0 +255,0 @@ if (!Array.isArray(value)) {

@@ -182,3 +182,7 @@ /**

}
throw new Error(`Found ${value} for non-optional type: ${type.typeName}`)
throw new Error(
`Found ${value} for non-optional type: ${type.typeName} (${ctx.codingPath
.map((path) => path.field)
.join('.')})`
)
}

@@ -185,0 +189,0 @@ if (abiType && abiType.toABI) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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