-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #323 from kennycud/master
Multi Trade Support
- Loading branch information
Showing
6 changed files
with
170 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export { request } from './fetch-request' | ||
export { transactionTypes as transactions } from './transactions/transactions' | ||
export { processTransaction, processTransactionVersion2, createTransaction, computeChatNonce, signChatTransaction, signArbitraryTransaction, signArbitraryWithFeeTransaction } from './createTransaction' | ||
export { tradeBotCreateRequest, tradeBotRespondRequest, signTradeBotTxn, deleteTradeOffer, sendBtc, sendLtc, sendDoge, sendDgb, sendRvn, sendArrr } from './tradeRequest' | ||
export { tradeBotCreateRequest, tradeBotRespondRequest, tradeBotRespondMultipleRequest, signTradeBotTxn, deleteTradeOffer, sendBtc, sendLtc, sendDoge, sendDgb, sendRvn, sendArrr } from './tradeRequest' | ||
export { cancelAllOffers } from './transactions/trade-portal/tradeoffer/cancelAllOffers' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
crypto/api/transactions/trade-portal/tradebot/TradeBotRespondMultipleRequest.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* CrossChain - TradeBot Respond Multiple Request (Buy Action) | ||
* | ||
* These are special types of transactions (JSON ENCODED) | ||
*/ | ||
|
||
export default class TradeBotRespondMultipleRequest { | ||
constructor() { | ||
// ... | ||
} | ||
|
||
createTransaction(txnReq) { | ||
this.addresses(txnReq.addresses) | ||
this.foreignKey(txnReq.foreignKey) | ||
this.receivingAddress(txnReq.receivingAddress) | ||
|
||
return this.txnRequest() | ||
} | ||
|
||
addresses(addresses) { | ||
this._addresses = addresses | ||
} | ||
|
||
foreignKey(foreignKey) { | ||
this._foreignKey = foreignKey | ||
} | ||
|
||
receivingAddress(receivingAddress) { | ||
this._receivingAddress = receivingAddress | ||
} | ||
|
||
txnRequest() { | ||
return { | ||
addresses: this._addresses, | ||
foreignKey: this._foreignKey, | ||
receivingAddress: this._receivingAddress | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters