mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-23 13:45:48 +00:00
reverse else order
This commit is contained in:
@@ -111,13 +111,13 @@ function signingClaimData(claim: ClaimObject): Buffer {
|
|||||||
const bytesList = new BytesList()
|
const bytesList = new BytesList()
|
||||||
bytesList.put(prefix)
|
bytesList.put(prefix)
|
||||||
bytesList.put(channel)
|
bytesList.put(channel)
|
||||||
if (typeof claim.amount === 'object') {
|
if (typeof claim.amount === 'string') {
|
||||||
const amount = coreTypes.Amount.from(claim.amount).toBytes()
|
|
||||||
bytesList.put(amount)
|
|
||||||
} else {
|
|
||||||
const num = bigInt(String(claim.amount))
|
const num = bigInt(String(claim.amount))
|
||||||
const amount = coreTypes.UInt64.from(num).toBytes()
|
const amount = coreTypes.UInt64.from(num).toBytes()
|
||||||
bytesList.put(amount)
|
bytesList.put(amount)
|
||||||
|
} else {
|
||||||
|
const amount = coreTypes.Amount.from(claim.amount).toBytes()
|
||||||
|
bytesList.put(amount)
|
||||||
}
|
}
|
||||||
return bytesList.toBytes()
|
return bytesList.toBytes()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user