Skip to content

Commit

Permalink
accept dots and commas as decimal separator for tips in farcaster frame
Browse files Browse the repository at this point in the history
  • Loading branch information
ginesdt committed Oct 10, 2024
1 parent 3541c61 commit 40a137a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/streamtide/server/farcaster_frame.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
["hono/jsx" :refer [jsx]]
[bignumber.core :as bn]
[cljs-time.coerce :as tc]
[clojure.string :as str]
[district.server.config :refer [config]]
[district.shared.async-helpers :refer [safe-go <?]]
[mount.core :as mount :refer [defstate]]
Expand Down Expand Up @@ -175,6 +176,7 @@
(safe-go
(let [creator (get-creator c)
input-amount (get-tip-value c)
input-amount (str/replace input-amount "," ".")
amount-wei (<? (dollar-to-wei input-amount opts))
chain-id (str "eip155:" (:chain-id opts))
st-address (-> @(-> @config :smart-contracts :contracts-var) :streamtide-fwd :address)]
Expand Down

0 comments on commit 40a137a

Please sign in to comment.