@@ -128,7 +128,7 @@ async def async_test(self):
128128 assert_equal (await wallet .get_best_block (), block_id )
129129
130130 balance = await wallet .get_balance ()
131- assert_in (f "Coins amount: 151" , balance )
131+ assert_in ("Coins amount: 151" , balance )
132132 assert_not_in ("Tokens" , balance )
133133
134134 # issue a valid token
@@ -142,7 +142,7 @@ async def async_test(self):
142142 self .generate_block ()
143143 assert_in ("Success" , await wallet .sync ())
144144 balance = await wallet .get_balance ()
145- assert_in (f "Coins amount: 50" , balance )
145+ assert_in ("Coins amount: 50" , balance )
146146 assert_not_in ("Tokens" , balance )
147147
148148 amount_to_mint = random .randint (1 , 10000 )
@@ -153,7 +153,7 @@ async def async_test(self):
153153 assert_in ("Success" , await wallet .sync ())
154154 balance = await wallet .get_balance ()
155155 print (balance )
156- assert_in (f "Coins amount: 0" , balance )
156+ assert_in ("Coins amount: 0" , balance )
157157 assert_in (f"Token: { token_id } amount: { amount_to_mint } " , balance )
158158
159159 ########################################################################################
@@ -165,7 +165,7 @@ async def async_test(self):
165165
166166 alice_amount_to_swap = amount_to_mint
167167 alice_htlc_tx = await wallet .create_htlc_transaction (alice_amount_to_swap , token_id , alice_secret_hash , bob_address , refund_address , 6 )
168- alice_signed_tx_obj = signed_tx_obj .decode (ScaleBytes ("0x" + alice_htlc_tx ))
168+ alice_signed_tx_obj = signed_tx_obj .decode (ScaleBytes ("0x" + alice_htlc_tx [ 'tx' ] ))
169169 alice_htlc_outputs = alice_signed_tx_obj ['transaction' ]['outputs' ]
170170 alice_htlc_change_dest = alice_htlc_outputs [1 ]['Transfer' ][1 ]
171171 alice_htlc_tx_id = hash_object (base_tx_obj , alice_signed_tx_obj ['transaction' ])
@@ -200,7 +200,7 @@ async def async_test(self):
200200
201201 bob_amount_to_swap = 150
202202 bob_htlc_tx = await wallet .create_htlc_transaction (bob_amount_to_swap , None , alice_secret_hash , alice_address , refund_address , 6 )
203- bob_signed_tx_obj = signed_tx_obj .decode (ScaleBytes ("0x" + bob_htlc_tx ))
203+ bob_signed_tx_obj = signed_tx_obj .decode (ScaleBytes ("0x" + bob_htlc_tx [ 'tx' ] ))
204204 bob_htlc_outputs = bob_signed_tx_obj ['transaction' ]['outputs' ]
205205 bob_htlc_change_dest = bob_htlc_outputs [1 ]['Transfer' ][1 ]
206206 bob_htlc_tx_id = hash_object (base_tx_obj , bob_signed_tx_obj ['transaction' ])
@@ -227,7 +227,7 @@ async def async_test(self):
227227 alice_refund_ptx = output .split ('\n ' )[2 ]
228228
229229 # Alice's htlc tx can now be broadcasted
230- output = await wallet .submit_transaction (alice_htlc_tx )
230+ output = await wallet .submit_transaction (alice_htlc_tx [ 'tx' ] )
231231 assert_in ("The transaction was submitted successfully" , output )
232232
233233 # Alice signs Bob's refund
@@ -238,22 +238,22 @@ async def async_test(self):
238238 bob_refund_ptx = output .split ('\n ' )[2 ]
239239
240240 # Bob's htlc tx can now be broadcasted
241- output = await wallet .submit_transaction (bob_htlc_tx )
241+ output = await wallet .submit_transaction (bob_htlc_tx [ 'tx' ] )
242242 assert_in ("The transaction was submitted successfully" , output )
243243
244244 self .generate_block ()
245245 assert_in ("Success" , await wallet .sync ())
246246
247247 # Check Alice's balance
248248 balance = await wallet .get_balance ()
249- assert_in (f "Coins amount: 0" , balance )
249+ assert_in ("Coins amount: 0" , balance )
250250 assert_not_in ("Tokens" , balance )
251251
252252 # Check Bob's balance now
253253 await self .switch_to_wallet (wallet , 'bob_wallet' )
254254 assert_in ("Success" , await wallet .sync ())
255255 balance = await wallet .get_balance ()
256- assert_in (f "Coins amount: 0" , balance )
256+ assert_in ("Coins amount: 0" , balance )
257257 assert_not_in ("Tokens" , balance )
258258
259259 ########################################################################################
@@ -270,7 +270,7 @@ async def async_test(self):
270270 assert_in ("Spending at height 9, locked until height 10" , output )
271271
272272 balance = await wallet .get_balance ()
273- assert_in (f "Coins amount: 0" , balance )
273+ assert_in ("Coins amount: 0" , balance )
274274 assert_not_in ("Tokens" , balance )
275275
276276 # Bob signs and spends the refund
@@ -286,7 +286,7 @@ async def async_test(self):
286286 assert_in ("Spending at height 9, locked until height 10" , output )
287287
288288 balance = await wallet .get_balance ()
289- assert_in (f "Coins amount: 0" , balance )
289+ assert_in ("Coins amount: 0" , balance )
290290 assert_not_in ("Tokens" , balance )
291291
292292 ########################################################################################
@@ -304,7 +304,7 @@ async def async_test(self):
304304 self .generate_block ()
305305 assert_in ("Success" , await wallet .sync ())
306306 balance = await wallet .get_balance ()
307- assert_in (f "Coins amount: 0" , balance )
307+ assert_in ("Coins amount: 0" , balance )
308308 assert_not_in ("Tokens" , balance )
309309
310310 self .generate_block ()
@@ -316,13 +316,13 @@ async def async_test(self):
316316 await self .switch_to_wallet (wallet , 'alice_wallet' )
317317 assert_in ("Success" , await wallet .sync ())
318318 balance = await wallet .get_balance ()
319- assert_in (f "Coins amount: 0" , balance )
319+ assert_in ("Coins amount: 0" , balance )
320320 assert_in (f"Token: { token_id } amount: { alice_amount_to_swap } " , balance )
321321
322322 await self .switch_to_wallet (wallet , 'bob_wallet' )
323323 assert_in ("Success" , await wallet .sync ())
324324 balance = await wallet .get_balance ()
325- assert_in (f"Coins amount: 150 " , balance )
325+ assert_in (f"Coins amount: { bob_amount_to_swap } " , balance )
326326 assert_not_in ("Tokens" , balance )
327327
328328
0 commit comments