diff --git a/assets/_locales/en/messages.json b/assets/_locales/en/messages.json
index da4cd9e7..0b8d8cf9 100644
--- a/assets/_locales/en/messages.json
+++ b/assets/_locales/en/messages.json
@@ -1937,11 +1937,11 @@
"description": "Popup description about ao token transfer learn more"
},
"ao_degraded": {
- "message": "AO Token Process Network Degraded.",
+ "message": "Unable to connect to AO Token Process",
"description": "ao degraded title text"
},
"ao_degraded_description": {
- "message": "AO token process will be available when
the network issues are resolved.",
+ "message": "AO balance will be available when
network issues are resolved.",
"description": "ao degraded description text"
},
"network_issue": {
diff --git a/assets/_locales/zh_CN/messages.json b/assets/_locales/zh_CN/messages.json
index e892a7ec..770aa7c5 100644
--- a/assets/_locales/zh_CN/messages.json
+++ b/assets/_locales/zh_CN/messages.json
@@ -1935,11 +1935,11 @@
"description": "Popup description about ao token transfer learn more"
},
"ao_degraded": {
- "message": "AO 代币处理网络降级。",
+ "message": "无法连接到 AO 令牌进程",
"description": "ao degraded title text"
},
"ao_degraded_description": {
- "message": "网络问题解决后,AO 代币处理将可用。",
+ "message": "网络问题解决后,AO 余额将可用。",
"description": "ao degraded description text"
},
"network_issue": {
diff --git a/src/routes/popup/send/confirm.tsx b/src/routes/popup/send/confirm.tsx
index f2e53ab5..a32e82f1 100644
--- a/src/routes/popup/send/confirm.tsx
+++ b/src/routes/popup/send/confirm.tsx
@@ -541,7 +541,10 @@ export default function Confirm({ tokenID, qty, subscription }: Props) {
useEffect(() => {
(async () => {
setIsLoading(true);
- if (!recipient?.address) return;
+ if (!recipient?.address) {
+ setIsLoading(false);
+ return;
+ }
// get the tx from storage
const prepared = await prepare(recipient.address);
@@ -554,7 +557,10 @@ export default function Confirm({ tokenID, qty, subscription }: Props) {
// check if the current wallet
// is a hardware wallet
- if (wallet?.type !== "hardware") return;
+ if (wallet?.type !== "hardware") {
+ setIsLoading(false);
+ return;
+ }
if (isAo) {
try {
diff --git a/src/tokens/aoTokens/ao.ts b/src/tokens/aoTokens/ao.ts
index a79f5cf1..53e7b50a 100644
--- a/src/tokens/aoTokens/ao.ts
+++ b/src/tokens/aoTokens/ao.ts
@@ -102,7 +102,7 @@ export function useAoTokens(
() =>
tokens.map((token) => ({
...token,
- balance: balances.find((bal) => bal.id === token.id)?.balance ?? null
+ balance: balances.find((bal) => bal.id === token.id)?.balance
})),
[tokens, balances]
);