@@ -7,20 +7,15 @@ import {
7
7
teardownClient ,
8
8
type XrplIntegrationTestContext ,
9
9
} from '../setup'
10
- import {
11
- fetchAccountReserveFee ,
12
- generateFundedWallet ,
13
- testTransaction ,
14
- } from '../utils'
10
+ import { generateFundedWallet , testTransaction } from '../utils'
15
11
16
12
// how long before each test case times out
17
13
const TIMEOUT = 20000
18
14
19
15
describe ( 'Payment' , function ( ) {
20
16
let testContext : XrplIntegrationTestContext
21
17
let paymentTx : Payment
22
- let amount : string
23
- const DEFAULT_AMOUNT = '10000000'
18
+ const AMOUNT = '10000000'
24
19
// This wallet is used for DeliverMax related tests
25
20
let senderWallet : Wallet
26
21
@@ -30,17 +25,14 @@ describe('Payment', function () {
30
25
paymentTx = {
31
26
TransactionType : 'Payment' ,
32
27
Account : senderWallet . classicAddress ,
33
- Amount : amount ,
28
+ Amount : AMOUNT ,
34
29
Destination : 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy' ,
35
30
}
36
31
} )
37
32
38
33
beforeAll ( async ( ) => {
39
34
testContext = await setupClient ( serverUrl )
40
35
senderWallet = await generateFundedWallet ( testContext . client )
41
- // Make sure the amount sent satisfies minimum reserve requirement to fund an account.
42
- amount =
43
- ( await fetchAccountReserveFee ( testContext . client ) ) ?? DEFAULT_AMOUNT
44
36
} )
45
37
afterAll ( async ( ) => teardownClient ( testContext ) )
46
38
@@ -68,7 +60,7 @@ describe('Payment', function () {
68
60
)
69
61
70
62
assert . equal ( result . result . engine_result_code , 0 )
71
- assert . equal ( ( result . result . tx_json as Payment ) . Amount , amount )
63
+ assert . equal ( ( result . result . tx_json as Payment ) . Amount , AMOUNT )
72
64
} ,
73
65
TIMEOUT ,
74
66
)
@@ -88,7 +80,7 @@ describe('Payment', function () {
88
80
)
89
81
90
82
assert . equal ( result . result . engine_result_code , 0 )
91
- assert . equal ( ( result . result . tx_json as Payment ) . Amount , amount )
83
+ assert . equal ( ( result . result . tx_json as Payment ) . Amount , AMOUNT )
92
84
} ,
93
85
TIMEOUT ,
94
86
)
@@ -106,7 +98,7 @@ describe('Payment', function () {
106
98
)
107
99
108
100
assert . equal ( result . result . engine_result_code , 0 )
109
- assert . equal ( ( result . result . tx_json as Payment ) . Amount , amount )
101
+ assert . equal ( ( result . result . tx_json as Payment ) . Amount , AMOUNT )
110
102
} ,
111
103
TIMEOUT ,
112
104
)
0 commit comments