mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
JS: Fix Amount.copyTo().
This commit is contained in:
committed by
Stefan Thomas
parent
45c54b6484
commit
bbfc348b85
@@ -318,7 +318,11 @@ Amount.prototype.copyTo = function(d, negate) {
|
||||
|
||||
d.offset = this.offset;
|
||||
d.is_native = this.is_native;
|
||||
d.is_negative = this.is_native ? undefined : !this.is_negative;
|
||||
d.is_negative = this.is_native
|
||||
? undefined // Native sign in BigInteger.
|
||||
: negate
|
||||
? !this.is_negative // Negating.
|
||||
: this.is_negative; // Just copying.
|
||||
|
||||
this.currency.copyTo(d.currency);
|
||||
this.issuer.copyTo(d.issuer);
|
||||
|
||||
Reference in New Issue
Block a user