diff --git a/src/backend/BrownFi.mo b/src/backend/BrownFi.mo index ecff2c7..084376f 100644 --- a/src/backend/BrownFi.mo +++ b/src/backend/BrownFi.mo @@ -587,7 +587,7 @@ shared(msg) actor class BrownFi(owner_ : Principal, bfId: Principal, capId_: Pri var realUser: Principal = msg.caller; switch (await getDelegatee(msg.caller)) { case (?delegatee) { realUser := delegatee; }; - case (_) { return #err("Delegatee not found")}; + case (_) { realUser := realUser; }; }; if (tokens.balanceOf(qtid, realUser) < (pAmount)) return #err("Insufficient balance: " # qtid); if (tokens.zeroFeeTransfer(qtid, realUser, Principal.fromActor(this), pAmount) == false) diff --git a/src/frontend/src/components/Swap.tsx b/src/frontend/src/components/Swap.tsx index 2b6597f..f7034a0 100644 --- a/src/frontend/src/components/Swap.tsx +++ b/src/frontend/src/components/Swap.tsx @@ -102,7 +102,7 @@ function Swap() { args: [ Principal.fromText((tokens.INPUT as TokenDetails).address), Principal.fromText((tokens.OUTPUT as TokenDetails).address), - BigInt(tokenAmounts[Field.INPUT]) * (BigInt(10) ** BigInt((tokens.INPUT as TokenDetails).decimals)), + BigInt(tokenAmounts[Field.INPUT]), BigInt("1741447837000000000") ] }); @@ -123,7 +123,7 @@ function Swap() { console.error(error) setStatus("fail") }) - + setStatus("loading") }; @@ -138,7 +138,7 @@ function Swap() {