4646 testAddressC = common .HexToAddress ("2b84C791b79Ee37De042AD2ffF1A253c3ce9bc27" )
4747
4848 ethGases = dexeth .VersionedGases [0 ]
49- tokenGases = dexeth .Tokens [testTokenID ].NetTokens [dex .Simnet ].SwapContracts [0 ].Gas
49+ tokenGases = dexeth .Tokens [simnetTokenID ].NetTokens [dex .Simnet ].SwapContracts [0 ].Gas
5050
5151 tETH = & dex.Asset {
5252 ID : 60 ,
6969 }
7070
7171 tToken = & dex.Asset {
72- ID : testTokenID ,
72+ ID : simnetTokenID ,
7373 Symbol : "dextt.eth" ,
7474 Version : 0 ,
7575 SwapSize : tokenGases .Swap ,
@@ -639,8 +639,8 @@ func tassetWallet(assetID uint32) (asset.Wallet, *assetWallet, *testNode, contex
639639 token : dexeth .Tokens [testTokenID ],
640640 }
641641 aw .wallets = map [uint32 ]* assetWallet {
642- testTokenID : aw ,
643- BipID : node .tokenParent ,
642+ simnetTokenID : aw ,
643+ BipID : node .tokenParent ,
644644 }
645645 }
646646
@@ -734,7 +734,7 @@ func TestBalance(t *testing.T) {
734734 for _ , test := range tests {
735735 var assetID uint32 = BipID
736736 if test .token {
737- assetID = testTokenID
737+ assetID = simnetTokenID
738738 }
739739
740740 _ , eth , node , shutdown := tassetWallet (assetID )
@@ -847,7 +847,7 @@ func TestFeeRate(t *testing.T) {
847847
848848func TestRefund (t * testing.T ) {
849849 t .Run ("eth" , func (t * testing.T ) { testRefund (t , BipID ) })
850- t .Run ("token" , func (t * testing.T ) { testRefund (t , testTokenID ) })
850+ t .Run ("token" , func (t * testing.T ) { testRefund (t , simnetTokenID ) })
851851}
852852
853853func testRefund (t * testing.T , assetID uint32 ) {
@@ -870,7 +870,7 @@ func testRefund(t *testing.T, assetID uint32) {
870870 dexeth .VersionedGases [1 ] = gasesV1
871871 defer delete (dexeth .VersionedGases , 1 )
872872 } else {
873- tokenContracts := dexeth .Tokens [testTokenID ].NetTokens [dex .Simnet ].SwapContracts
873+ tokenContracts := dexeth .Tokens [simnetTokenID ].NetTokens [dex .Simnet ].SwapContracts
874874 tc := * tokenContracts [0 ]
875875 tc .Gas = * gasesV1
876876 tokenContracts [1 ] = & tc
@@ -1030,7 +1030,7 @@ func (b *badCoin) Value() uint64 {
10301030
10311031func TestFundOrderReturnCoinsFundingCoins (t * testing.T ) {
10321032 t .Run ("eth" , func (t * testing.T ) { testFundOrderReturnCoinsFundingCoins (t , BipID ) })
1033- t .Run ("token" , func (t * testing.T ) { testFundOrderReturnCoinsFundingCoins (t , testTokenID ) })
1033+ t .Run ("token" , func (t * testing.T ) { testFundOrderReturnCoinsFundingCoins (t , simnetTokenID ) })
10341034}
10351035
10361036func testFundOrderReturnCoinsFundingCoins (t * testing.T , assetID uint32 ) {
@@ -1446,7 +1446,7 @@ func TestPreSwap(t *testing.T) {
14461446 var assetID uint32 = BipID
14471447 assetCfg := tETH
14481448 if test .token {
1449- assetID = testTokenID
1449+ assetID = simnetTokenID
14501450 assetCfg = tToken
14511451 }
14521452
@@ -1502,7 +1502,7 @@ func TestPreSwap(t *testing.T) {
15021502
15031503func TestSwap (t * testing.T ) {
15041504 t .Run ("eth" , func (t * testing.T ) { testSwap (t , BipID ) })
1505- t .Run ("token" , func (t * testing.T ) { testSwap (t , testTokenID ) })
1505+ t .Run ("token" , func (t * testing.T ) { testSwap (t , simnetTokenID ) })
15061506}
15071507
15081508func testSwap (t * testing.T , assetID uint32 ) {
@@ -1781,7 +1781,7 @@ func TestPreRedeem(t *testing.T) {
17811781 }
17821782
17831783 // Token
1784- w , _ , node , shutdown2 := tassetWallet (testTokenID )
1784+ w , _ , node , shutdown2 := tassetWallet (simnetTokenID )
17851785 defer shutdown2 ()
17861786
17871787 form .AssetConfig = tToken
@@ -1799,7 +1799,7 @@ func TestPreRedeem(t *testing.T) {
17991799
18001800func TestRedeem (t * testing.T ) {
18011801 t .Run ("eth" , func (t * testing.T ) { testRedeem (t , BipID ) })
1802- t .Run ("token" , func (t * testing.T ) { testRedeem (t , testTokenID ) })
1802+ t .Run ("token" , func (t * testing.T ) { testRedeem (t , simnetTokenID ) })
18031803}
18041804
18051805func testRedeem (t * testing.T , assetID uint32 ) {
@@ -1809,7 +1809,7 @@ func testRedeem(t *testing.T, assetID uint32) {
18091809 // Test with a non-zero contract version to ensure it makes it into the receipt
18101810 contractVer := uint32 (1 )
18111811 dexeth .VersionedGases [1 ] = ethGases // for dexeth.RedeemGas(..., 1)
1812- tokenContracts := dexeth .Tokens [testTokenID ].NetTokens [dex .Simnet ].SwapContracts
1812+ tokenContracts := dexeth .Tokens [simnetTokenID ].NetTokens [dex .Simnet ].SwapContracts
18131813 tokenContracts [1 ] = tokenContracts [0 ]
18141814 defer delete (dexeth .VersionedGases , 1 )
18151815 defer delete (tokenContracts , 1 )
@@ -2474,7 +2474,7 @@ func TestMaxOrder(t *testing.T) {
24742474 var assetID uint32 = BipID
24752475 dexAsset := tETH
24762476 if test .token {
2477- assetID = testTokenID
2477+ assetID = simnetTokenID
24782478 }
24792479
24802480 w , _ , node , shutdown := tassetWallet (assetID )
@@ -2562,7 +2562,7 @@ func packRedeemDataV0(redemptions []*dexeth.Redemption) ([]byte, error) {
25622562
25632563func TestAuditContract (t * testing.T ) {
25642564 t .Run ("eth" , func (t * testing.T ) { testAuditContract (t , BipID ) })
2565- t .Run ("token" , func (t * testing.T ) { testAuditContract (t , testTokenID ) })
2565+ t .Run ("token" , func (t * testing.T ) { testAuditContract (t , simnetTokenID ) })
25662566}
25672567
25682568func testAuditContract (t * testing.T , assetID uint32 ) {
@@ -3148,7 +3148,7 @@ func TestLocktimeExpired(t *testing.T) {
31483148
31493149func TestFindRedemption (t * testing.T ) {
31503150 t .Run ("eth" , func (t * testing.T ) { testFindRedemption (t , BipID ) })
3151- t .Run ("token" , func (t * testing.T ) { testFindRedemption (t , testTokenID ) })
3151+ t .Run ("token" , func (t * testing.T ) { testFindRedemption (t , simnetTokenID ) })
31523152}
31533153
31543154func testFindRedemption (t * testing.T , assetID uint32 ) {
@@ -3290,7 +3290,7 @@ func testFindRedemption(t *testing.T, assetID uint32) {
32903290
32913291func TestRefundReserves (t * testing.T ) {
32923292 t .Run ("eth" , func (t * testing.T ) { testRefundReserves (t , BipID ) })
3293- t .Run ("token" , func (t * testing.T ) { testRefundReserves (t , testTokenID ) })
3293+ t .Run ("token" , func (t * testing.T ) { testRefundReserves (t , simnetTokenID ) })
32943294}
32953295
32963296func testRefundReserves (t * testing.T , assetID uint32 ) {
@@ -3318,7 +3318,7 @@ func testRefundReserves(t *testing.T, assetID uint32) {
33183318 feeWallet = node .tokenParent
33193319 assetV0 = * tToken
33203320 assetV1 = * tToken
3321- tokenContracts := dexeth .Tokens [testTokenID ].NetTokens [dex .Simnet ].SwapContracts
3321+ tokenContracts := dexeth .Tokens [simnetTokenID ].NetTokens [dex .Simnet ].SwapContracts
33223322 gasesV0 = & tokenGases
33233323 tc := * tokenContracts [0 ]
33243324 tc .Gas = * gasesV1
@@ -3385,7 +3385,7 @@ func testRefundReserves(t *testing.T, assetID uint32) {
33853385
33863386func TestRedemptionReserves (t * testing.T ) {
33873387 t .Run ("eth" , func (t * testing.T ) { testRedemptionReserves (t , BipID ) })
3388- t .Run ("token" , func (t * testing.T ) { testRedemptionReserves (t , testTokenID ) })
3388+ t .Run ("token" , func (t * testing.T ) { testRedemptionReserves (t , simnetTokenID ) })
33893389}
33903390
33913391func testRedemptionReserves (t * testing.T , assetID uint32 ) {
@@ -3413,7 +3413,7 @@ func testRedemptionReserves(t *testing.T, assetID uint32) {
34133413 feeWallet = node .tokenParent
34143414 assetV0 = * tToken
34153415 assetV1 = * tToken
3416- tokenContracts := dexeth .Tokens [testTokenID ].NetTokens [dex .Simnet ].SwapContracts
3416+ tokenContracts := dexeth .Tokens [simnetTokenID ].NetTokens [dex .Simnet ].SwapContracts
34173417 gasesV0 = & tokenGases
34183418 tc := * tokenContracts [0 ]
34193419 tc .Gas = * gasesV1
@@ -3517,7 +3517,7 @@ func TestReconfigure(t *testing.T) {
35173517
35183518func TestSend (t * testing.T ) {
35193519 t .Run ("eth" , func (t * testing.T ) { testSend (t , BipID ) })
3520- t .Run ("token" , func (t * testing.T ) { testSend (t , testTokenID ) })
3520+ t .Run ("token" , func (t * testing.T ) { testSend (t , simnetTokenID ) })
35213521}
35223522
35233523func testSend (t * testing.T , assetID uint32 ) {
@@ -3602,7 +3602,7 @@ func testSend(t *testing.T, assetID uint32) {
36023602
36033603func TestConfirmRedemption (t * testing.T ) {
36043604 t .Run ("eth" , func (t * testing.T ) { testConfirmRedemption (t , BipID ) })
3605- t .Run ("token" , func (t * testing.T ) { testConfirmRedemption (t , testTokenID ) })
3605+ t .Run ("token" , func (t * testing.T ) { testConfirmRedemption (t , simnetTokenID ) })
36063606}
36073607
36083608func testConfirmRedemption (t * testing.T , assetID uint32 ) {
@@ -4458,7 +4458,7 @@ func TestMarshalMonitoredTx(t *testing.T) {
44584458
44594459func TestEstimateSendTxFee (t * testing.T ) {
44604460 t .Run ("eth" , func (t * testing.T ) { testEstimateSendTxFee (t , BipID ) })
4461- t .Run ("token" , func (t * testing.T ) { testEstimateSendTxFee (t , testTokenID ) })
4461+ t .Run ("token" , func (t * testing.T ) { testEstimateSendTxFee (t , simnetTokenID ) })
44624462}
44634463
44644464func testEstimateSendTxFee (t * testing.T , assetID uint32 ) {
0 commit comments