Skip to content

Commit

Permalink
Fixed silly token standard parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
glottologist committed Oct 26, 2023
1 parent 01be131 commit a60de19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions batcher/utils.mligo
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,6 @@ let send_add_reward
(token_standard_opt: string option) : operation =
let token_addr = assert_some_or_fail_with token_addr_opt invalid_token_address in
let token_standard = assert_some_or_fail_with token_standard_opt token_standard_not_found in
if token_standard = "FA2 standard" then getfa12tokenbalance owner callback token_addr else
if token_standard = "FA1.2 standard" then getfa2tokenbalance owner callback token_id token_addr else
if token_standard = "FA1.2 token" then getfa12tokenbalance owner callback token_addr else
if token_standard = "FA2 token" then getfa2tokenbalance owner callback token_id token_addr else
failwith token_standard_not_found
11 changes: 5 additions & 6 deletions batcher/vault.mligo
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ let assert_balances
let nt = nta.token in
let _ft = storage.foreign_tokens in
let ntop = gettokenbalance vault_address vault_address nt.token_id nt.address nt.standard in
(* let trigger_balance_update (ops,(_name,ta): (operation list * (string * token_amount))) : operation list =
let trigger_balance_update (ops,(_name,ta): (operation list * (string * token_amount))) : operation list =
(gettokenbalance vault_address vault_address ta.token.token_id ta.token.address ta.token.standard) :: ops
in
Map.fold trigger_balance_update ft [ ntop ] *)
[ntop]
Map.fold trigger_balance_update ft [ ntop ]



Expand All @@ -44,12 +43,12 @@ let assert_balances
let deposit
(deposit_address : address)
(deposited_token : token_amount)
(_storage:storage): operation list =
(storage:storage): operation list =
let treasury_vault = get_vault () in
let deposit_op = Treasury_Utils.handle_transfer deposit_address treasury_vault deposited_token in
[ deposit_op ]
(* let bal_ops = assert_balances storage in
deposit_op :: bal_ops *)
let bal_ops = assert_balances storage in
deposit_op :: bal_ops

[@inline]
let find_liquidity_amount
Expand Down

0 comments on commit a60de19

Please sign in to comment.