Skip to content

Commit 382a90d

Browse files
committed
update root condition
1 parent bc99690 commit 382a90d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

bittensor/core/extrinsics/asyncex/staking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ async def add_stake_extrinsic(
123123
base_price = pool.price.tao
124124

125125
if pool.netuid == 0:
126-
price_with_tolerance = base_price * (1 + rate_tolerance)
127-
else:
128126
price_with_tolerance = base_price
127+
else:
128+
price_with_tolerance = base_price * (1 + rate_tolerance)
129129

130130
logging.info(
131131
f":satellite: [magenta]Safe Staking to:[/magenta] "

bittensor/core/extrinsics/asyncex/unstaking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ async def unstake_extrinsic(
110110
base_price = pool.price.tao
111111

112112
if pool.netuid == 0:
113-
price_with_tolerance = base_price * (1 - rate_tolerance)
114-
else:
115113
price_with_tolerance = base_price
114+
else:
115+
price_with_tolerance = base_price * (1 - rate_tolerance)
116116

117117
logging.info(
118118
f":satellite: [magenta]Safe Unstaking from:[/magenta] "

bittensor/core/extrinsics/staking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ def add_stake_extrinsic(
115115
base_price = pool.price.tao
116116

117117
if pool.netuid == 0:
118-
price_with_tolerance = base_price * (1 + rate_tolerance)
119-
else:
120118
price_with_tolerance = base_price
119+
else:
120+
price_with_tolerance = base_price * (1 + rate_tolerance)
121121

122122
logging.info(
123123
f":satellite: [magenta]Safe Staking to:[/magenta] "

bittensor/core/extrinsics/unstaking.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ def unstake_extrinsic(
108108
base_price = pool.price.tao
109109

110110
if pool.netuid == 0:
111-
price_with_tolerance = base_price * (1 - rate_tolerance)
112-
else:
113111
price_with_tolerance = base_price
112+
else:
113+
price_with_tolerance = base_price * (1 - rate_tolerance)
114114

115115
logging.info(
116116
f":satellite: [magenta]Safe Unstaking from:[/magenta] "

0 commit comments

Comments
 (0)