diff --git a/enjoy/assets/alipay.png b/enjoy/assets/alipay.png new file mode 100644 index 00000000..e4549fb2 Binary files /dev/null and b/enjoy/assets/alipay.png differ diff --git a/enjoy/assets/mastercard.png b/enjoy/assets/mastercard.png new file mode 100644 index 00000000..c3f227ae Binary files /dev/null and b/enjoy/assets/mastercard.png differ diff --git a/enjoy/assets/unionpay.png b/enjoy/assets/unionpay.png new file mode 100644 index 00000000..191f2e78 Binary files /dev/null and b/enjoy/assets/unionpay.png differ diff --git a/enjoy/assets/visa.png b/enjoy/assets/visa.png new file mode 100644 index 00000000..29baa46d Binary files /dev/null and b/enjoy/assets/visa.png differ diff --git a/enjoy/assets/wechatpay.png b/enjoy/assets/wechatpay.png new file mode 100644 index 00000000..18ca6bbd Binary files /dev/null and b/enjoy/assets/wechatpay.png differ diff --git a/enjoy/src/api/client.ts b/enjoy/src/api/client.ts index 0f1eb140..51d4b7ff 100644 --- a/enjoy/src/api/client.ts +++ b/enjoy/src/api/client.ts @@ -419,6 +419,7 @@ export class Client { createPayment(params: { amount: number; + reconciledCurrency: string; processor: string; paymentType: string; }): Promise { diff --git a/enjoy/src/i18n/en.json b/enjoy/src/i18n/en.json index b45e6b4d..6fce7d07 100644 --- a/enjoy/src/i18n/en.json +++ b/enjoy/src/i18n/en.json @@ -593,5 +593,6 @@ "areYouSureToSaveTranscription": "It will perform a force-alignment between the audio and your edited transcription. Are you sure to continue?", "summarize": "Summarize", "noResultsFound": "No results found", - "readThrough": "Read through" + "readThrough": "Read through", + "selectCrypto": "Select crypto" } diff --git a/enjoy/src/i18n/zh-CN.json b/enjoy/src/i18n/zh-CN.json index f012144f..57b6d96f 100644 --- a/enjoy/src/i18n/zh-CN.json +++ b/enjoy/src/i18n/zh-CN.json @@ -593,5 +593,6 @@ "areYouSureToSaveTranscription": "即将根据您修改后的语音文本对语音重新进行对齐,确定要继续吗?", "summarize": "提炼主题", "noResultsFound": "没有找到结果", - "readThrough": "朗读全文" + "readThrough": "朗读全文", + "selectCrypto": "选择加密货币" } diff --git a/enjoy/src/renderer/components/preferences/balance-settings.tsx b/enjoy/src/renderer/components/preferences/balance-settings.tsx index 3f2f4933..8ff087a0 100644 --- a/enjoy/src/renderer/components/preferences/balance-settings.tsx +++ b/enjoy/src/renderer/components/preferences/balance-settings.tsx @@ -19,6 +19,13 @@ import { TableHeader, TableRow, toast, + Separator, + Select, + SelectItem, + SelectTrigger, + SelectValue, + SelectContent, + SelectGroup, } from "@renderer/components/ui"; import { LoaderSpin } from "@renderer/components"; import { LoaderIcon } from "lucide-react"; @@ -31,6 +38,19 @@ export const BalanceSettings = () => { const [loading, setLoading] = useState(false); const [paymentCreated, setPaymentCreated] = useState(false); const [payments, setPayments] = useState([]); + const [assests, setAssests] = useState([]); + const [currency, setCurrency] = useState(""); + + const fetchAssests = () => { + webApi + .config("supported_assets") + .then((assests) => { + setAssests(assests); + }) + .catch((error) => { + toast.error(error.message); + }); + }; const refreshPayments = () => { webApi @@ -58,6 +78,7 @@ export const BalanceSettings = () => { webApi .createPayment({ amount: depositAmount, + reconciledCurrency: processor === "stripe" ? "" : currency, paymentType: "deposit", processor, }) @@ -77,6 +98,7 @@ export const BalanceSettings = () => { useEffect(() => { refreshBalance(); + fetchAssests(); }, []); if (!balance) return null; @@ -108,7 +130,7 @@ export const BalanceSettings = () => { - + {t("deposit")} {t("depositDescription")} @@ -140,39 +162,84 @@ export const BalanceSettings = () => { )} + + + {user.hasMixin && ( +
+ + + +
+ )} + +
+
+ + + + + +
+ +
+ + + - {paymentCreated ? null : ( - <> - {user.hasMixin && ( - - )} - - - )} {payments.length > 0 && (