Skip to content

Commit 241dea7

Browse files
committed
Have I mentioned this framework is suboptimal?
1 parent 1b4972d commit 241dea7

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

chia/_tests/cmds/wallet/test_wallet.py

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from chia.types.blockchain_format.program import Program
3030
from chia.types.signing_mode import SigningMode
3131
from chia.util.bech32m import encode_puzzle_hash
32-
from chia.wallet.conditions import ConditionValidTimes
32+
from chia.wallet.conditions import Condition, ConditionValidTimes
3333
from chia.wallet.trade_record import TradeRecord
3434
from chia.wallet.trading.offer import Offer
3535
from chia.wallet.trading.trade_status import TradeStatus
@@ -44,6 +44,7 @@
4444
BalanceResponse,
4545
CancelOfferResponse,
4646
CATSpendResponse,
47+
ClawbackPuzzleDecoratorOverride,
4748
CreateOfferForIDsResponse,
4849
FungibleAsset,
4950
GetHeightInfoResponse,
@@ -58,6 +59,7 @@
5859
NFTGetWalletDID,
5960
NFTGetWalletDIDResponse,
6061
RoyaltyAsset,
62+
SendTransaction,
6163
SendTransactionResponse,
6264
TakeOfferResponse,
6365
TransactionRecordWithMetadata,
@@ -327,19 +329,24 @@ def test_send(capsys: object, get_test_cli_clients: tuple[TestRpcClients, Path])
327329
class SendWalletRpcClient(TestWalletRpcClient):
328330
async def send_transaction(
329331
self,
330-
wallet_id: int,
331-
amount: uint64,
332-
address: str,
332+
request: SendTransaction,
333333
tx_config: TXConfig,
334-
fee: uint64 = uint64(0),
335-
memos: Optional[list[str]] = None,
336-
puzzle_decorator_override: Optional[list[dict[str, Union[str, int, bool]]]] = None,
337-
push: bool = True,
334+
extra_conditions: tuple[Condition, ...] = tuple(),
338335
timelock_info: ConditionValidTimes = ConditionValidTimes(),
339336
) -> SendTransactionResponse:
340337
self.add_to_log(
341338
"send_transaction",
342-
(wallet_id, amount, address, tx_config, fee, memos, puzzle_decorator_override, push, timelock_info),
339+
(
340+
request.wallet_id,
341+
request.amount,
342+
request.address,
343+
tx_config,
344+
request.fee,
345+
request.memos,
346+
request.puzzle_decorator,
347+
request.push,
348+
timelock_info,
349+
),
343350
)
344351
name = get_bytes32(2)
345352
tx_rec = TransactionRecord(
@@ -457,7 +464,7 @@ async def cat_spend(
457464
),
458465
500000000000,
459466
["0x6262626262626262626262626262626262626262626262626262626262626262"],
460-
[{"decorator": "CLAWBACK", "clawback_timelock": 60}],
467+
[ClawbackPuzzleDecoratorOverride(decorator="CLAWBACK", clawback_timelock=uint64(60))],
461468
True,
462469
test_condition_valid_times,
463470
)

0 commit comments

Comments
 (0)