Skip to content

Commit

Permalink
changed orders to v2 (pywaves)
Browse files Browse the repository at this point in the history
  • Loading branch information
iammortimer committed Jan 22, 2020
1 parent 652d015 commit 15db89f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions address.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,10 @@ def massTransferWaves(self, transfers, attachment='', timestamp=0,baseFee=0):
baseFee = self.pycwaves.DEFAULT_BASE_FEE

txFee = baseFee + (math.ceil((len(transfers) + 1) / 2 - 0.5)) * baseFee

if (asset.isSmart()):
txFee += smartFee

totalAmount = 0

for i in range(0, len(transfers)):
Expand Down Expand Up @@ -695,7 +699,8 @@ def _postOrder(self, amountAsset, priceAsset, orderType, amount, price, maxLifet
expiration = timestamp + maxLifetime * 1000
asset1 = b'\0' if amountAsset.assetId=='' else b'\1' + base58.b58decode(amountAsset.assetId)
asset2 = b'\0' if priceAsset.assetId=='' else b'\1' + base58.b58decode(priceAsset.assetId)
sData = base58.b58decode(self.publicKey) + \
sData = b'\2' + \
base58.b58decode(self.publicKey) + \
base58.b58decode(self.pycwaves.MATCHER_PUBLICKEY) + \
asset1 + \
asset2 + \
Expand All @@ -720,7 +725,8 @@ def _postOrder(self, amountAsset, priceAsset, orderType, amount, price, maxLifet
"timestamp": timestamp,
"expiration": expiration,
"matcherFee": matcherFee,
"signature": signature
"signature": signature,
"version": 2
})
req = self.pycwaves.wrapper('/matcher/orderbook', data, host=self.pycwaves.MATCHER)
id = -1
Expand Down

0 comments on commit 15db89f

Please sign in to comment.