@@ -19,7 +19,7 @@ func TestVirtualAccountReceiveAndThenPull(t *testing.T) {
19
19
})
20
20
require .Empty (t , postings )
21
21
22
- postings = vacc .Pull ("USD" , big . NewInt ( 0 ), interpreter.Sender {
22
+ postings = vacc .Pull ("USD" , interpreter.Sender {
23
23
Account : interpreter .AccountAddress ("dest" ),
24
24
Amount : big .NewInt (10 ),
25
25
})
@@ -42,7 +42,7 @@ func TestVirtualAccountReceiveAndThenPullPartialAmount(t *testing.T) {
42
42
})
43
43
require .Empty (t , postings )
44
44
45
- postings = vacc .Pull ("USD" , big . NewInt ( 0 ), interpreter.Sender {
45
+ postings = vacc .Pull ("USD" , interpreter.Sender {
46
46
Account : interpreter .AccountAddress ("dest" ),
47
47
Amount : big .NewInt (1 ), // <- we're only pulling 1 out of 10
48
48
})
@@ -64,7 +64,7 @@ func TestVirtualAccountPullFirst(t *testing.T) {
64
64
vacc := interpreter .NewVirtualAccount ()
65
65
66
66
// Now we pull first. Note the unbounded overdraft
67
- postings := vacc .Pull ("USD" , nil , interpreter.Sender {
67
+ postings := vacc .Pull ("USD" , interpreter.Sender {
68
68
Account : interpreter .AccountAddress ("dest" ),
69
69
Amount : big .NewInt (10 ),
70
70
})
@@ -90,7 +90,7 @@ func TestVirtualAccountPullFirstMixed(t *testing.T) {
90
90
vacc := interpreter .NewVirtualAccount ()
91
91
92
92
// 1 USD of debt
93
- vacc .Pull ("USD" , nil , interpreter.Sender {
93
+ vacc .Pull ("USD" , interpreter.Sender {
94
94
Account : interpreter .AccountAddress ("lender" ),
95
95
Amount : big .NewInt (1 ),
96
96
})
@@ -110,7 +110,7 @@ func TestVirtualAccountPullFirstMixed(t *testing.T) {
110
110
}, postings )
111
111
112
112
// pull the rest
113
- postings = vacc .Pull ("USD" , nil , interpreter.Sender {
113
+ postings = vacc .Pull ("USD" , interpreter.Sender {
114
114
Account : interpreter .AccountAddress ("dest" ),
115
115
Amount : big .NewInt (100 ),
116
116
})
@@ -156,7 +156,7 @@ func TestVirtualAccountTransitiveWhenNotOverdraft(t *testing.T) {
156
156
require .Equal (t , []Posting {
157
157
{"src" , "dest" , amt , "USD" },
158
158
},
159
- v1 .Pull ("USD" , nil , interpreter.Sender {
159
+ v1 .Pull ("USD" , interpreter.Sender {
160
160
Account : interpreter .AccountAddress ("dest" ),
161
161
Amount : amt ,
162
162
}))
@@ -188,7 +188,7 @@ func TestVirtualAccountTransitiveWhenOverdraft(t *testing.T) {
188
188
// => [{@src, @dest, 10}]
189
189
require .Equal (t , []Posting {
190
190
{"src" , "dest" , amt , "USD" },
191
- }, v1 .Pull ("USD" , nil , interpreter.Sender {
191
+ }, v1 .Pull ("USD" , interpreter.Sender {
192
192
Account : interpreter .AccountAddress ("dest" ),
193
193
Amount : amt ,
194
194
}))
@@ -212,7 +212,7 @@ func TestVirtualAccountTransitiveWhenOverdraftAndPayLast(t *testing.T) {
212
212
}))
213
213
214
214
// $v1 -> @dest (10 USD)
215
- require .Empty (t , v1 .Pull ("USD" , nil , interpreter.Sender {
215
+ require .Empty (t , v1 .Pull ("USD" , interpreter.Sender {
216
216
Account : interpreter .AccountAddress ("dest" ),
217
217
Amount : amt ,
218
218
}))
@@ -254,7 +254,7 @@ func TestVirtualAccountTransitiveTwoSteps(t *testing.T) {
254
254
}))
255
255
256
256
// $v2 -> @dest
257
- require .Empty (t , v2 .Pull ("USD" , nil , interpreter.Sender {
257
+ require .Empty (t , v2 .Pull ("USD" , interpreter.Sender {
258
258
Account : interpreter .AccountAddress ("dest" ),
259
259
Amount : amt ,
260
260
}))
@@ -304,7 +304,7 @@ func TestVirtualAccountTransitiveTwoStepsPayFirst(t *testing.T) {
304
304
// $v2 -> @dest
305
305
require .Equal (t , []Posting {
306
306
{"src" , "dest" , amt , "USD" },
307
- }, v2 .Pull ("USD" , nil , interpreter.Sender {
307
+ }, v2 .Pull ("USD" , interpreter.Sender {
308
308
Account : interpreter .AccountAddress ("dest" ),
309
309
Amount : amt ,
310
310
}))
@@ -345,7 +345,7 @@ func TestCommutativeOrder(t *testing.T) {
345
345
})
346
346
},
347
347
func () []Posting {
348
- return v2 .Pull ("USD" , nil , interpreter.Sender {
348
+ return v2 .Pull ("USD" , interpreter.Sender {
349
349
Account : interpreter .AccountAddress ("dest" ),
350
350
Amount : amt ,
351
351
})
0 commit comments