Skip to content

Commit b530f83

Browse files
committed
Uncomment NFT wallet functional test
1 parent 0866470 commit b530f83

File tree

5 files changed

+24
-26
lines changed

5 files changed

+24
-26
lines changed

Diff for: test/functional/test_framework/wallet_cli_controller.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ async def unmint_tokens(self, token_id: str, amount: int) -> str:
192192
return await self._write_command(f"unminttokens {token_id} {amount}\n")
193193

194194
async def lock_token_suply(self, token_id: str) -> str:
195-
return await self._write_command(f"locktokensuply {token_id}\n")
195+
return await self._write_command(f"locktokensupply {token_id}\n")
196196

197197
async def issue_new_nft(self,
198198
destination_address: str,

Diff for: test/functional/wallet_nfts.py

+19-21
Original file line numberDiff line numberDiff line change
@@ -119,27 +119,25 @@ async def async_test(self):
119119
assert_in("Success", await wallet.sync())
120120

121121

122-
# TODO: add support for tokens v1
123-
# See https://github.com/mintlayer/mintlayer-core/issues/1237
124-
#self.log.info(await wallet.get_balance())
125-
#assert_in(f"{nft_id} amount: 1", await wallet.get_balance())
126-
127-
## create a new account and send some tokens to it
128-
#await wallet.create_new_account()
129-
#await wallet.select_account(1)
130-
#address = await wallet.new_address()
131-
132-
#await wallet.select_account(0)
133-
#assert_in(f"{nft_id} amount: 1", await wallet.get_balance())
134-
#output = await wallet.send_tokens_to_address(nft_id, address, 1)
135-
#self.log.info(output)
136-
#assert_in("The transaction was submitted successfully", output)
137-
138-
#self.generate_block()
139-
#assert_in("Success", await wallet.sync())
140-
141-
## check the new balance nft is not present
142-
#assert nft_id not in await wallet.get_balance()
122+
self.log.info(await wallet.get_balance())
123+
assert_in(f"{nft_id} amount: 1", await wallet.get_balance())
124+
125+
# create a new account and send some tokens to it
126+
await wallet.create_new_account()
127+
await wallet.select_account(1)
128+
address = await wallet.new_address()
129+
130+
await wallet.select_account(0)
131+
assert_in(f"{nft_id} amount: 1", await wallet.get_balance())
132+
output = await wallet.send_tokens_to_address(nft_id, address, 1)
133+
self.log.info(output)
134+
assert_in("The transaction was submitted successfully", output)
135+
136+
self.generate_block()
137+
assert_in("Success", await wallet.sync())
138+
139+
# check the new balance nft is not present
140+
assert nft_id not in await wallet.get_balance()
143141

144142
if __name__ == '__main__':
145143
WalletNfts().main()

Diff for: test/functional/wallet_tokens_change_supply.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def generate_block(self):
5858
block_input_data = block_input_data_obj.encode(block_input_data).to_hex()[2:]
5959

6060
# create a new block, taking transactions from mempool
61-
block = node.blockprod_generate_block(block_input_data, None)
61+
block = node.blockprod_generate_block(block_input_data, [], [], "FillSpaceFromMempool")
6262
node.chainstate_submit_block(block)
6363
block_id = node.chainstate_best_block_id()
6464

Diff for: wallet/src/wallet/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2309,7 +2309,7 @@ fn issue_and_transfer_tokens(#[case] seed: Seed) {
23092309
#[case(Seed::from_entropy())]
23102310
fn check_tokens_v0_are_ignored(#[case] seed: Seed) {
23112311
let mut rng = make_seedable_rng(seed);
2312-
let chain_config = Arc::new(create_mainnet());
2312+
let chain_config = Arc::new(create_regtest());
23132313

23142314
let mut wallet = create_wallet(chain_config.clone());
23152315

Diff for: wallet/wallet-cli-lib/src/commands/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ pub enum WalletCommand {
220220
},
221221

222222
/// Lock the circulating supply for the token
223-
LockTokenSuply {
223+
LockTokenSupply {
224224
token_id: String,
225225
},
226226

@@ -889,7 +889,7 @@ impl CommandHandler {
889889
Ok(Self::tx_submitted_command())
890890
}
891891

892-
WalletCommand::LockTokenSuply { token_id } => {
892+
WalletCommand::LockTokenSupply { token_id } => {
893893
let token_id = parse_token_id(chain_config, token_id.as_str())?;
894894

895895
self.get_synced_controller()

0 commit comments

Comments
 (0)