Commit 98e09058 authored by Son of Odin's avatar Son of Odin

tweaks

parent 63cd419b
Pipeline #118100625 failed with stages
in 29 seconds
......@@ -53,7 +53,7 @@ txns = [
"STAKER-2",
[
Coin("BNB", 200000000),
Coin("RUNE-A1F", 50000000000),
Coin("RUNE-A1F", 50900000000),
Coin("LOK-3C0", 10000000000),
],
"SEED",
......@@ -171,20 +171,20 @@ txns = [
# Misc
[
Transaction(
Binance.chain, "USER-1", "VAULT", [Coin("RUNE-A1F", 100000000)], " "
Binance.chain, "USER-1", "VAULT", [Coin("RUNE-A1F", 200000000)], " "
),
1,
],
[
Transaction(
Binance.chain, "USER-1", "VAULT", [Coin("RUNE-A1F", 100000000)], "ABDG?"
Binance.chain, "USER-1", "VAULT", [Coin("RUNE-A1F", 200000000)], "ABDG?"
),
1,
],
# Swaps
[
Transaction(Binance.chain, "USER-1", "VAULT", [Coin("BNB", 1)], "SWAP:BNB.BNB"),
1,
Transaction(Binance.chain, "USER-1", "VAULT", [Coin("BNB", 30000000)], "SWAP:BNB.BNB"),
1, # cannot swap BNB for BNB
],
[
Transaction(
......@@ -204,7 +204,7 @@ txns = [
],
[
Transaction(
Binance.chain, "USER-1", "VAULT", [Coin("RUNE-A1F", 1)], "SWAP:BNB.BNB"
Binance.chain, "USER-1", "VAULT", [Coin("RUNE-A1F", 100000001)], "SWAP:BNB.BNB"
),
1,
],
......
......@@ -98,7 +98,8 @@ class ThorchainState:
for coin in txn.coins:
if coin.is_rune():
coin.amount -= rune_fee # deduct 1 rune transaction fee
outbound.append(txn)
if coin.amount > 0:
outbound.append(txn)
else:
pool = self.get_pool(coin.asset)
if not pool.is_zero():
......@@ -110,7 +111,8 @@ class ThorchainState:
self.set_pool(pool)
coin.amount -= asset_fee
outbound.append(txn)
if coin.amount > 0:
outbound.append(txn)
return outbound
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment