File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
bittensor_cli/src/commands Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -2002,9 +2002,9 @@ async def check_swap_status(
2002
2002
origin_ss58: The SS58 address of the original coldkey
2003
2003
block_number: Optional block number where the swap was scheduled
2004
2004
"""
2005
- scheduled_swaps = await subtensor .get_scheduled_coldkey_swap ()
2006
2005
2007
2006
if not origin_ss58 :
2007
+ scheduled_swaps = await subtensor .get_scheduled_coldkey_swap ()
2008
2008
if not scheduled_swaps :
2009
2009
console .print ("[yellow]No pending coldkey swaps found.[/yellow]" )
2010
2010
return
@@ -2036,8 +2036,16 @@ async def check_swap_status(
2036
2036
"\n [dim]Tip: Check specific swap details by providing the original coldkey SS58 address and the block number.[/dim]"
2037
2037
)
2038
2038
return
2039
-
2040
- is_pending = origin_ss58 in scheduled_swaps
2039
+ chain_reported_completion_block , destination_address = await subtensor .query (
2040
+ "SubtensorModule" , "ColdkeySwapScheduled" , [origin_ss58 ]
2041
+ )
2042
+ if (
2043
+ chain_reported_completion_block != 0
2044
+ and destination_address != "5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM"
2045
+ ):
2046
+ is_pending = True
2047
+ else :
2048
+ is_pending = False
2041
2049
2042
2050
if not is_pending :
2043
2051
console .print (
@@ -2050,7 +2058,7 @@ async def check_swap_status(
2050
2058
)
2051
2059
2052
2060
if expected_block_number is None :
2053
- return
2061
+ expected_block_number = chain_reported_completion_block
2054
2062
2055
2063
swap_info = await find_coldkey_swap_extrinsic (
2056
2064
subtensor = subtensor ,
You can’t perform that action at this time.
0 commit comments