mirror of
https://github.com/Qortal/qortal.git
synced 2025-06-06 00:07:00 +00:00
Delegated buildOfferMessage functionality to CrossChainUtils and removed copies of it from each individual class. Delegated trade bot state enumerations to the TradeStates class.
This commit is contained in:
parent
8c1251d716
commit
51feb96824
@ -748,12 +748,6 @@ public class DogecoinACCTv1 implements ACCT {
|
|||||||
return tradeData;
|
return tradeData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns 'offer' MESSAGE payload for trade partner to send to AT creator's trade address. */
|
|
||||||
public static byte[] buildOfferMessage(byte[] partnerBitcoinPKH, byte[] hashOfSecretA, int lockTimeA) {
|
|
||||||
byte[] lockTimeABytes = BitTwiddling.toBEByteArray((long) lockTimeA);
|
|
||||||
return Bytes.concat(partnerBitcoinPKH, hashOfSecretA, lockTimeABytes);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Returns info extracted from 'offer' MESSAGE payload sent by trade partner to AT creator's trade address, or null if not valid. */
|
/** Returns info extracted from 'offer' MESSAGE payload sent by trade partner to AT creator's trade address, or null if not valid. */
|
||||||
public static OfferMessageData extractOfferMessageData(byte[] messageData) {
|
public static OfferMessageData extractOfferMessageData(byte[] messageData) {
|
||||||
if (messageData == null || messageData.length != OFFER_MESSAGE_LENGTH)
|
if (messageData == null || messageData.length != OFFER_MESSAGE_LENGTH)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user