Skip to content

Commit

Permalink
Merge pull request #156 from arconnectio/fix/temp-disable-u-token
Browse files Browse the repository at this point in the history
fix: temp disables u-token on send page
  • Loading branch information
nicholaswma authored Nov 21, 2023
2 parents f781feb + 03ddd13 commit 1f0e103
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
4 changes: 4 additions & 0 deletions assets/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@
"message": "Disabled",
"description": "Disabled label"
},
"u_token_disabled": {
"message": "Transfering of U-Token is currently disabled",
"description": "U-token Disabled label"
},
"spent": {
"message": "Spent",
"description": "Spent text"
Expand Down
27 changes: 21 additions & 6 deletions src/routes/popup/send/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Section,
Spacer,
Text,
Tooltip,
useInput
} from "@arconnect/components";
import browser from "webextension-polyfill";
Expand Down Expand Up @@ -391,13 +392,27 @@ export default function Send({ id }: Props) {
<ChevronRightIcon />
</TokenSelectorRightSide>
</TokenSelector>
<Button
disabled={invalidQty || parseFloat(qty) === 0 || qty === ""}
onClick={send}
<Tooltip
content={
token.id === "KTzTXT_ANmF84fWEKHzWURD1LWd9QaFR9yfYUwH2Lxw"
? browser.i18n.getMessage("u_token_disabled")
: ""
}
>
{browser.i18n.getMessage("send")}
<ArrowUpRightIcon />
</Button>
<Button
disabled={
invalidQty ||
parseFloat(qty) === 0 ||
qty === "" ||
token.id === "KTzTXT_ANmF84fWEKHzWURD1LWd9QaFR9yfYUwH2Lxw"
}
fullWidth
onClick={send}
>
{browser.i18n.getMessage("send")}
<ArrowUpRightIcon />
</Button>
</Tooltip>
</BottomActions>
<AnimatePresence>
{showTokenSelector && (
Expand Down

0 comments on commit 1f0e103

Please sign in to comment.