File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 11const makePlaceAssetTxns = require ( '../txns/sell/makePlaceAssetTxns' ) ;
2+ const makePlaceAlgoTxns = require ( '../txns/buy/makePlaceAlgoTxns' ) ;
23const compile = require ( '../compile/compile' ) ;
34const AlgodexApi = require ( '../../AlgodexApi' ) ;
45
@@ -46,6 +47,23 @@ const TransactionGenerator = {
4647 } )
4748 ) ;
4849 } ,
50+ getPlaceAlgoEscrowOrderTxns : async function ( order , optIn ) {
51+ return await makePlaceAlgoTxns (
52+ await compile ( {
53+ ...order ,
54+ appId :
55+ typeof order . appId === 'undefined'
56+ ? await algodexApi . getAppId ( order )
57+ : order . appId ,
58+ version : 6 ,
59+ indexer : algodexApi . indexer ,
60+ wallet : {
61+ ...order . wallet ,
62+ ...( await algodexApi . http . indexer . fetchAccountInfo ( order . wallet ) ) ,
63+ } ,
64+ } )
65+ ) ;
66+ } ,
4967} ;
5068
5169module . exports = TransactionGenerator ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const connector = require('../../wallet/connectors/AlgoSDK');
1010const placeASAOrderTest = require ( './teal_tests/placeASAEscrowOrder.js' ) ;
1111// const closeASAOrderTest = require('./teal_tests/closeASAEscrowOrder.js');
1212const constants = require ( './constants.js' ) ;
13+ const beforeAll = require ( './beforeAll.js' ) ;
1314const JEST_MINUTE_TIMEOUT = 60 * 1000 ;
1415
1516const config = {
@@ -58,6 +59,9 @@ const textEncoder = new TextEncoder();
5859//
5960//
6061describe ( 'ASA ESCROW ORDER BOOK' , ( ) => {
62+ beforeAll ( async ( ) => {
63+ // setup step: Send target asset from open account to creator account
64+ } ) ;
6165 // test(
6266 // 'Create asa escrow order book',
6367 // async () => {
You can’t perform that action at this time.
0 commit comments