summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFrank <[email protected]>2025-12-31 11:53:59 -0500
committerFrank <[email protected]>2025-12-31 11:54:01 -0500
commit840fe030ab6f2c026bbb14b4ddddc0ed2a352bb3 (patch)
treec2946189d94b26eda3efd829a6d080a24ec30f2a
parenta7c4f83ca2e4d5da94de3df0c210dbb36b0bae86 (diff)
downloadopencode-840fe030ab6f2c026bbb14b4ddddc0ed2a352bb3.tar.gz
opencode-840fe030ab6f2c026bbb14b4ddddc0ed2a352bb3.zip
zen: fix fee instruction
-rw-r--r--packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx12
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx
index 99b593966..b099e900e 100644
--- a/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx
+++ b/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx
@@ -1,5 +1,5 @@
import { json, action, useParams, createAsync, useSubmission } from "@solidjs/router"
-import { createEffect, Show } from "solid-js"
+import { createEffect, Show, createMemo } from "solid-js"
import { createStore } from "solid-js/store"
import { withActor } from "~/context/auth.withActor"
import { Billing } from "@opencode-ai/console-core/billing.js"
@@ -68,6 +68,12 @@ export function ReloadSection() {
reloadTrigger: "",
})
+ const processingFee = createMemo(() => {
+ const reloadAmount = billingInfo()?.reloadAmount
+ if (!reloadAmount) return "0.00"
+ return (((reloadAmount + 0.3) / 0.956) * 0.044 + 0.3).toFixed(2)
+ })
+
createEffect(() => {
if (!setReloadSubmission.pending && setReloadSubmission.result && !(setReloadSubmission.result as any).error) {
setStore("show", false)
@@ -104,8 +110,8 @@ export function ReloadSection() {
}
>
<p>
- Auto reload is <b>enabled</b>. We'll reload <b>${billingInfo()?.reloadAmount}</b> (+$1.23 processing fee)
- when balance reaches <b>${billingInfo()?.reloadTrigger}</b>.
+ Auto reload is <b>enabled</b>. We'll reload <b>${billingInfo()?.reloadAmount}</b> (+${processingFee()}{" "}
+ processing fee) when balance reaches <b>${billingInfo()?.reloadTrigger}</b>.
</p>
</Show>
<button data-color="primary" type="button" onClick={() => show()}>