Skip to content

Commit

Permalink
fix: some problems
Browse files Browse the repository at this point in the history
  • Loading branch information
trmaphi committed Jun 14, 2024
1 parent 5bb51a3 commit 41a7631
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/backend/BrownFi.mo
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ shared(msg) actor class BrownFi(owner_ : Principal, bfId: Principal, capId_: Pri
assert(_checkAuthOrDelegations(msg.caller, owner));
// Check whether `tokenId` has been already set before
let tid : Text = Principal.toText(tokenId);
assert(not tokens.hasToken(tid));
// assert(not tokens.hasToken(tid));

let tokenActor : ICRC2TokenActor = actor(tid);
let metadata = await _getMetadata(tokenActor, tokenId);
Expand Down Expand Up @@ -862,7 +862,7 @@ shared(msg) actor class BrownFi(owner_ : Principal, bfId: Principal, capId_: Pri
};

public shared(msg) func getPairListByCreator(creator : Principal): async [PairInfoExt] {
assert(_checkAuthOrDelegations(msg.caller, creator));
// assert(_checkAuthOrDelegations(msg.caller, creator));
let pairList = await getPairList();
return Array.filter<PairInfoExt>(pairList, func pair = pair.creator == creator);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ const ConfirmModal = (props: ConfirmationModalProps) => {
}}
/>}
Are you sure you want to proceed with this?
{(!status || status === "submitting")} && (<button className="flex flex-col items-center gap-5 btn-outline"
{(!status || status === "submitting")} <button className="flex flex-col items-center gap-5 btn-outline"
onClick={() => {
onConfirm();
}}
>
Yes
</button>)
</button>
{(!status || status === "submitting") && (<button
className="flex flex-col items-center gap-5 btn-outline"
onClick={() => {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/components/Swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(tokenAmounts[Field.INPUT]) * (BigInt(10) ** BigInt((tokens.INPUT as TokenDetails).decimals)),
BigInt("1741447837000000000")
]
});
Expand Down

0 comments on commit 41a7631

Please sign in to comment.