diff --git a/tests/raid_test.py b/tests/raid_test.py index 33298d3..89a7bb6 100644 --- a/tests/raid_test.py +++ b/tests/raid_test.py @@ -469,6 +469,14 @@ def test_get_claim_items_plain_value(memo: str): "ticker": "RUNESTONE_FENRIR1", }, }, + { + "recipient": "0x2531e5e06cBD11aF54f98D39578990716fFC7dBa", + "amount": { + "quantity": 100, + "decimalPlaces": 0, + "ticker": "Item_NT_500000", + }, + }, ] plain_value: ActionPlainValue = get_claim_items_plain_value(recipients, memo) assert plain_value["type_id"] == "claim_items" @@ -481,7 +489,7 @@ def test_get_claim_items_plain_value(memo: str): { "decimalPlaces": b"\x12", "minters": None, - "ticker": "CRYSTAL", + "ticker": "FAV__CRYSTAL", }, 10000000000000000000, ], @@ -489,7 +497,15 @@ def test_get_claim_items_plain_value(memo: str): { "decimalPlaces": b"\x00", "minters": None, - "ticker": "RUNESTONE_FENRIR1", + "ticker": "FAV__RUNESTONE_FENRIR1", + }, + 100, + ], + [ + { + "decimalPlaces": b"\x00", + "minters": None, + "ticker": "Item_NT_500000", }, 100, ], diff --git a/world_boss/app/raid.py b/world_boss/app/raid.py index 457b9bb..5fedd37 100644 --- a/world_boss/app/raid.py +++ b/world_boss/app/raid.py @@ -514,12 +514,16 @@ def get_claim_items_plain_value( amount = r["amount"] decimal_places = amount["decimalPlaces"] address = bytes.fromhex(r["recipient"].replace("0x", "")) + ticker: str = amount["ticker"] + # wrapp fav currency + if not ticker.startswith("Item"): + ticker = f"FAV__{ticker}" claim_data_dict[address].append( [ { "decimalPlaces": decimal_places.to_bytes(1, "big"), "minters": None, - "ticker": amount["ticker"], + "ticker": ticker, }, amount["quantity"] * 10**decimal_places, ],