From bcd131f0d92b0ac0877dfab0a7010b8b3dfccd54 Mon Sep 17 00:00:00 2001
From: robertu <4065233+robertu7@users.noreply.github.com>
Date: Sun, 3 Mar 2024 10:58:37 +0800
Subject: [PATCH 1/2] fix(donation): prompt to reapprove if exceeded allowance
---
lang/default.json | 21 ++++++++
lang/en.json | 21 ++++++++
lang/zh-Hans.json | 21 ++++++++
lang/zh-Hant.json | 21 ++++++++
src/common/enums/text.ts | 6 ---
src/components/Dialogs/ENSDialog/LinkENS.tsx | 5 +-
.../PayTo/SetAmount/SubmitButton.tsx | 41 ++++++++------
.../PaymentForm/PayTo/SetAmount/index.tsx | 54 +++++++++++--------
.../Forms/PaymentForm/Processing/index.tsx | 7 +--
9 files changed, 148 insertions(+), 49 deletions(-)
diff --git a/lang/default.json b/lang/default.json
index 4fbf47b7e2..625947b28e 100644
--- a/lang/default.json
+++ b/lang/default.json
@@ -23,6 +23,9 @@
"+aMAeT": {
"defaultMessage": "Address copied"
},
+ "+bwe8v": {
+ "defaultMessage": "Stripe will process your payment, so you can support the author wherever you are."
+ },
"+cS08C": {
"defaultMessage": "Are you sure you want to remove ‘{article}’ from this collection?",
"description": "src/components/Dialogs/RemoveArticleCollectionDialog/index.tsx"
@@ -229,6 +232,9 @@
"3kbIhS": {
"defaultMessage": "Untitled"
},
+ "3lMsOU": {
+ "defaultMessage": "Reapprove to continue"
+ },
"3phEFL": {
"defaultMessage": "Continued use indicates your agreement to",
"description": "src/components/Forms/SelectAuthMethodForm/NormalFeed.tsx"
@@ -319,6 +325,9 @@
"defaultMessage": "Set threshold for circle (per month)",
"description": "src/components/Forms/CreateCircleForm/Init.tsx"
},
+ "6ErzDk": {
+ "defaultMessage": "Reconnect Wallet"
+ },
"6N2LKY": {
"defaultMessage": "Please log in again.",
"description": "OAUTH_TOKEN_INVALID"
@@ -828,6 +837,9 @@
"defaultMessage": "New followers",
"description": "src/views/Me/Settings/Notifications/GeneralSettings/index.tsx"
},
+ "JmzmVH": {
+ "defaultMessage": "Switch to"
+ },
"JpS59y": {
"defaultMessage": "Accepted",
"description": "src/views/Circle/Settings/ManageInvitation/Invites/index.tsx"
@@ -1160,6 +1172,9 @@
"defaultMessage": "Subscribers",
"description": "src/views/Circle/Analytics/SubscriberAnalytics/index.tsx"
},
+ "Tgd5id": {
+ "defaultMessage": "Transfer amount exceeds allowance"
+ },
"TjWWxF": {
"defaultMessage": "Broadcast sent",
"description": "src/views/Circle/Broadcast/Broadcast.tsx"
@@ -1426,6 +1441,9 @@
"ai7kS4": {
"defaultMessage": "My Works"
},
+ "aoDcrD": {
+ "defaultMessage": "Approve to continue"
+ },
"aqX2Bt": {
"defaultMessage": "go to the homepage",
"description": "src/views/Callback/UI.tsx"
@@ -1883,6 +1901,9 @@
"defaultMessage": "Set password succeed",
"description": "src/components/Dialogs/SetPasswordDialog/Content.tsx"
},
+ "pKkpI9": {
+ "defaultMessage": "The wallet address is not the one you bound to account. Please switch it in the wallet or reconnect as:"
+ },
"pRV+UD": {
"defaultMessage": "Collapse",
"description": "src/components/Comment/DropdownActions/CollapseComment/Button.tsx"
diff --git a/lang/en.json b/lang/en.json
index a12aa816fb..32ab5339e7 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -23,6 +23,9 @@
"+aMAeT": {
"defaultMessage": "Address copied"
},
+ "+bwe8v": {
+ "defaultMessage": "Stripe will process your payment, so you can support the author wherever you are."
+ },
"+cS08C": {
"defaultMessage": "Are you sure you want to remove ‘{article}’ from this collection?",
"description": "src/components/Dialogs/RemoveArticleCollectionDialog/index.tsx"
@@ -229,6 +232,9 @@
"3kbIhS": {
"defaultMessage": "Untitled"
},
+ "3lMsOU": {
+ "defaultMessage": "Reapprove to continue"
+ },
"3phEFL": {
"defaultMessage": "Continued use indicates your agreement to ",
"description": "src/components/Forms/SelectAuthMethodForm/NormalFeed.tsx"
@@ -319,6 +325,9 @@
"defaultMessage": "Set threshold for circle (per month)",
"description": "src/components/Forms/CreateCircleForm/Init.tsx"
},
+ "6ErzDk": {
+ "defaultMessage": "Reconnect Wallet"
+ },
"6N2LKY": {
"defaultMessage": "Please log in again.",
"description": "OAUTH_TOKEN_INVALID"
@@ -828,6 +837,9 @@
"defaultMessage": "New followers",
"description": "src/views/Me/Settings/Notifications/GeneralSettings/index.tsx"
},
+ "JmzmVH": {
+ "defaultMessage": "Switch to "
+ },
"JpS59y": {
"defaultMessage": "Accepted",
"description": "src/views/Circle/Settings/ManageInvitation/Invites/index.tsx"
@@ -1160,6 +1172,9 @@
"defaultMessage": "Subscribers",
"description": "src/views/Circle/Analytics/SubscriberAnalytics/index.tsx"
},
+ "Tgd5id": {
+ "defaultMessage": "Transfer amount exceeds allowance"
+ },
"TjWWxF": {
"defaultMessage": "Broadcast sent",
"description": "src/views/Circle/Broadcast/Broadcast.tsx"
@@ -1426,6 +1441,9 @@
"ai7kS4": {
"defaultMessage": "My Works"
},
+ "aoDcrD": {
+ "defaultMessage": "Approve to continue"
+ },
"aqX2Bt": {
"defaultMessage": "go to the homepage",
"description": "src/views/Callback/UI.tsx"
@@ -1883,6 +1901,9 @@
"defaultMessage": "Set password succeed",
"description": "src/components/Dialogs/SetPasswordDialog/Content.tsx"
},
+ "pKkpI9": {
+ "defaultMessage": "The wallet address is not the one you bound to account. Please switch it in the wallet or reconnect as:"
+ },
"pRV+UD": {
"defaultMessage": "Collapse",
"description": "src/components/Comment/DropdownActions/CollapseComment/Button.tsx"
diff --git a/lang/zh-Hans.json b/lang/zh-Hans.json
index a5e43400b0..faddd50b83 100644
--- a/lang/zh-Hans.json
+++ b/lang/zh-Hans.json
@@ -23,6 +23,9 @@
"+aMAeT": {
"defaultMessage": "地址已复制"
},
+ "+bwe8v": {
+ "defaultMessage": "Stripe will process your payment, so you can support the author wherever you are."
+ },
"+cS08C": {
"defaultMessage": "确认要将“{article}”从选集中移出吗?",
"description": "src/components/Dialogs/RemoveArticleCollectionDialog/index.tsx"
@@ -229,6 +232,9 @@
"3kbIhS": {
"defaultMessage": "未命名"
},
+ "3lMsOU": {
+ "defaultMessage": "重新授权后继续"
+ },
"3phEFL": {
"defaultMessage": "继续使用表示您同意",
"description": "src/components/Forms/SelectAuthMethodForm/NormalFeed.tsx"
@@ -319,6 +325,9 @@
"defaultMessage": "设定围炉门槛(每月)",
"description": "src/components/Forms/CreateCircleForm/Init.tsx"
},
+ "6ErzDk": {
+ "defaultMessage": "重新连接钱包"
+ },
"6N2LKY": {
"defaultMessage": "授权信息已失效,请重新登入",
"description": "OAUTH_TOKEN_INVALID"
@@ -828,6 +837,9 @@
"defaultMessage": "被追踪",
"description": "src/views/Me/Settings/Notifications/GeneralSettings/index.tsx"
},
+ "JmzmVH": {
+ "defaultMessage": "切换到 "
+ },
"JpS59y": {
"defaultMessage": "已接受",
"description": "src/views/Circle/Settings/ManageInvitation/Invites/index.tsx"
@@ -1160,6 +1172,9 @@
"defaultMessage": "付费人数",
"description": "src/views/Circle/Analytics/SubscriberAnalytics/index.tsx"
},
+ "Tgd5id": {
+ "defaultMessage": "支持金额超出授权额度"
+ },
"TjWWxF": {
"defaultMessage": "广播已送出",
"description": "src/views/Circle/Broadcast/Broadcast.tsx"
@@ -1426,6 +1441,9 @@
"ai7kS4": {
"defaultMessage": "我的创作"
},
+ "aoDcrD": {
+ "defaultMessage": "首次需确认授权后继续"
+ },
"aqX2Bt": {
"defaultMessage": "前往首页",
"description": "src/views/Callback/UI.tsx"
@@ -1883,6 +1901,9 @@
"defaultMessage": "登录密码已设置",
"description": "src/components/Dialogs/SetPasswordDialog/Content.tsx"
},
+ "pKkpI9": {
+ "defaultMessage": "The wallet address is not the one you bound to account. Please switch it in the wallet or reconnect as:"
+ },
"pRV+UD": {
"defaultMessage": "折叠",
"description": "src/components/Comment/DropdownActions/CollapseComment/Button.tsx"
diff --git a/lang/zh-Hant.json b/lang/zh-Hant.json
index e49c2dac2a..35f39ef308 100644
--- a/lang/zh-Hant.json
+++ b/lang/zh-Hant.json
@@ -23,6 +23,9 @@
"+aMAeT": {
"defaultMessage": "地址已複製"
},
+ "+bwe8v": {
+ "defaultMessage": "Stripe will process your payment, so you can support the author wherever you are."
+ },
"+cS08C": {
"defaultMessage": "確認要將「{article}」從選集中移出嗎?",
"description": "src/components/Dialogs/RemoveArticleCollectionDialog/index.tsx"
@@ -229,6 +232,9 @@
"3kbIhS": {
"defaultMessage": "未命名"
},
+ "3lMsOU": {
+ "defaultMessage": "重新授權後繼續"
+ },
"3phEFL": {
"defaultMessage": "繼續使用表示您同意",
"description": "src/components/Forms/SelectAuthMethodForm/NormalFeed.tsx"
@@ -319,6 +325,9 @@
"defaultMessage": "設定圍爐門檻(每月)",
"description": "src/components/Forms/CreateCircleForm/Init.tsx"
},
+ "6ErzDk": {
+ "defaultMessage": "重新連接錢包"
+ },
"6N2LKY": {
"defaultMessage": "授權信息已失效,請重新登入",
"description": "OAUTH_TOKEN_INVALID"
@@ -828,6 +837,9 @@
"defaultMessage": "被追蹤",
"description": "src/views/Me/Settings/Notifications/GeneralSettings/index.tsx"
},
+ "JmzmVH": {
+ "defaultMessage": "切換到 "
+ },
"JpS59y": {
"defaultMessage": "已接受",
"description": "src/views/Circle/Settings/ManageInvitation/Invites/index.tsx"
@@ -1160,6 +1172,9 @@
"defaultMessage": "付費人數",
"description": "src/views/Circle/Analytics/SubscriberAnalytics/index.tsx"
},
+ "Tgd5id": {
+ "defaultMessage": "支持金額超出授權額度"
+ },
"TjWWxF": {
"defaultMessage": "廣播已送出",
"description": "src/views/Circle/Broadcast/Broadcast.tsx"
@@ -1426,6 +1441,9 @@
"ai7kS4": {
"defaultMessage": "我的創作"
},
+ "aoDcrD": {
+ "defaultMessage": "首次需確認授權後繼續"
+ },
"aqX2Bt": {
"defaultMessage": "前往首頁",
"description": "src/views/Callback/UI.tsx"
@@ -1883,6 +1901,9 @@
"defaultMessage": "登入密碼已設定",
"description": "src/components/Dialogs/SetPasswordDialog/Content.tsx"
},
+ "pKkpI9": {
+ "defaultMessage": "The wallet address is not the one you bound to account. Please switch it in the wallet or reconnect as:"
+ },
"pRV+UD": {
"defaultMessage": "闔上",
"description": "src/components/Comment/DropdownActions/CollapseComment/Button.tsx"
diff --git a/src/common/enums/text.ts b/src/common/enums/text.ts
index f976ae5bd9..62d59131f8 100644
--- a/src/common/enums/text.ts
+++ b/src/common/enums/text.ts
@@ -120,8 +120,6 @@ export const TEXT = {
readCount: '閱讀次數',
readHistory: '瀏覽記錄',
readTime: '累計閱讀時數',
- reconnectHint:
- '當前錢包地址與帳戶綁定不同,若要變更請直接操作錢包或重新連接為:',
refund: '退款',
refuse: '拒絕',
register: '註冊',
@@ -339,8 +337,6 @@ export const TEXT = {
readCount: '阅读次数',
readHistory: '浏览记录',
readTime: '累计阅读时数',
- reconnectHint:
- '当前钱包地址与帐户绑定不同,若要变更请直接操作钱包或重新连接为:',
refund: '退款',
refuse: '拒绝',
register: '注册',
@@ -572,8 +568,6 @@ export const TEXT = {
readCount: 'Read Counts',
readHistory: 'Read History',
readTime: 'Accumulated Read Time',
- reconnectHint:
- 'The wallet address is not the one you bound to account. Please switch it in the wallet or reconnect as: ',
refund: 'Refund',
refuse: 'Decline',
register: 'Register',
diff --git a/src/components/Dialogs/ENSDialog/LinkENS.tsx b/src/components/Dialogs/ENSDialog/LinkENS.tsx
index 9a22dea506..8f4d2d3c0c 100644
--- a/src/components/Dialogs/ENSDialog/LinkENS.tsx
+++ b/src/components/Dialogs/ENSDialog/LinkENS.tsx
@@ -198,7 +198,10 @@ const LinkENS = ({
-
-