stellar-base
Advanced tools
Comparing version 0.4.12 to 0.4.13
@@ -20,2 +20,4 @@ "use strict"; | ||
var UnsignedHyper = require("js-xdr").UnsignedHyper; | ||
var BigNumber = _interopRequire(require("bignumber.js")); | ||
@@ -113,3 +115,3 @@ | ||
return xdr.Memo.memoId(id); | ||
return xdr.Memo.memoId(UnsignedHyper.fromString(id)); | ||
}) | ||
@@ -116,0 +118,0 @@ }, |
@@ -606,2 +606,7 @@ "use strict"; | ||
// Decimal places (max 7) | ||
if (amount.decimalPlaces() > 7) { | ||
return false; | ||
} | ||
// Infinity | ||
@@ -608,0 +613,0 @@ if (!amount.isFinite()) { |
{ | ||
"name": "stellar-base", | ||
"version": "0.4.12", | ||
"version": "0.4.13", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "babel-runtime": { |
{ | ||
"name": "stellar-base", | ||
"version": "0.4.12", | ||
"version": "0.4.13", | ||
"description": "Low level stellar support library", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
import {default as xdr} from "./generated/stellar-xdr_generated"; | ||
import {isString, isUndefined} from 'lodash'; | ||
import {UnsignedHyper} from "js-xdr"; | ||
import BigNumber from 'bignumber.js'; | ||
@@ -61,3 +62,3 @@ | ||
return xdr.Memo.memoId(id); | ||
return xdr.Memo.memoId(UnsignedHyper.fromString(id)); | ||
} | ||
@@ -64,0 +65,0 @@ |
@@ -534,2 +534,7 @@ import {default as xdr} from "./generated/stellar-xdr_generated"; | ||
// Decimal places (max 7) | ||
if (amount.decimalPlaces() > 7) { | ||
return false; | ||
} | ||
// Infinity | ||
@@ -536,0 +541,0 @@ if (!amount.isFinite()) { |
@@ -543,3 +543,4 @@ import BigNumber from 'bignumber.js'; | ||
"10", | ||
"0.10" | ||
"0.10", | ||
"0.1234567" | ||
]; | ||
@@ -561,2 +562,3 @@ | ||
"-10.5", | ||
"0.12345678", | ||
"Infinity", | ||
@@ -563,0 +565,0 @@ Infinity, |
@@ -9,2 +9,3 @@ describe('TransactionBuilder', function() { | ||
var transaction; | ||
var memo; | ||
beforeEach(function () { | ||
@@ -15,2 +16,3 @@ source = new StellarBase.Account("GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ", 0); | ||
asset = StellarBase.Asset.native(); | ||
memo = StellarBase.Memo.id("100"); | ||
@@ -23,2 +25,3 @@ transaction = new StellarBase.TransactionBuilder(source) | ||
})) | ||
.addMemo(memo) | ||
.build(); | ||
@@ -25,0 +28,0 @@ }); |
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 not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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 too big to display
2500000
40769