|
29 | 29 | from chia.types.blockchain_format.program import Program
|
30 | 30 | from chia.types.signing_mode import SigningMode
|
31 | 31 | from chia.util.bech32m import encode_puzzle_hash
|
32 |
| -from chia.wallet.conditions import ConditionValidTimes |
| 32 | +from chia.wallet.conditions import Condition, ConditionValidTimes |
33 | 33 | from chia.wallet.trade_record import TradeRecord
|
34 | 34 | from chia.wallet.trading.offer import Offer
|
35 | 35 | from chia.wallet.trading.trade_status import TradeStatus
|
|
44 | 44 | BalanceResponse,
|
45 | 45 | CancelOfferResponse,
|
46 | 46 | CATSpendResponse,
|
| 47 | + ClawbackPuzzleDecoratorOverride, |
47 | 48 | CreateOfferForIDsResponse,
|
48 | 49 | FungibleAsset,
|
49 | 50 | GetHeightInfoResponse,
|
|
58 | 59 | NFTGetWalletDID,
|
59 | 60 | NFTGetWalletDIDResponse,
|
60 | 61 | RoyaltyAsset,
|
| 62 | + SendTransaction, |
61 | 63 | SendTransactionResponse,
|
62 | 64 | TakeOfferResponse,
|
63 | 65 | TransactionRecordWithMetadata,
|
@@ -327,19 +329,24 @@ def test_send(capsys: object, get_test_cli_clients: tuple[TestRpcClients, Path])
|
327 | 329 | class SendWalletRpcClient(TestWalletRpcClient):
|
328 | 330 | async def send_transaction(
|
329 | 331 | self,
|
330 |
| - wallet_id: int, |
331 |
| - amount: uint64, |
332 |
| - address: str, |
| 332 | + request: SendTransaction, |
333 | 333 | 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(), |
338 | 335 | timelock_info: ConditionValidTimes = ConditionValidTimes(),
|
339 | 336 | ) -> SendTransactionResponse:
|
340 | 337 | self.add_to_log(
|
341 | 338 | "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 | + ), |
343 | 350 | )
|
344 | 351 | name = get_bytes32(2)
|
345 | 352 | tx_rec = TransactionRecord(
|
@@ -457,7 +464,7 @@ async def cat_spend(
|
457 | 464 | ),
|
458 | 465 | 500000000000,
|
459 | 466 | ["0x6262626262626262626262626262626262626262626262626262626262626262"],
|
460 |
| - [{"decorator": "CLAWBACK", "clawback_timelock": 60}], |
| 467 | + [ClawbackPuzzleDecoratorOverride(decorator="CLAWBACK", clawback_timelock=uint64(60))], |
461 | 468 | True,
|
462 | 469 | test_condition_valid_times,
|
463 | 470 | )
|
|
0 commit comments