|
28 | 28 |
|
29 | 29 | (def interceptors [re/trim-v]) |
30 | 30 |
|
| 31 | +(def default-token-amount |
| 32 | + {:token-amount 0 :human-amount "0" :decimals 18}) |
31 | 33 |
|
32 | 34 | (def state-default |
33 | | - {:job/title "Rauamaak on meie saak" |
34 | | - :job/description "Tee t88d ja n2e vaeva" |
35 | | - :job/category "Admin Support" |
| 35 | + {:job/title "" |
| 36 | + :job/description "" |
| 37 | + :job/category "" |
36 | 38 | :job/bid-option :hourly-rate |
37 | 39 | :job/required-experience-level :intermediate |
38 | 40 | :job/estimated-project-length :day |
39 | 41 | :job/required-availability :full-time |
40 | | - :job/required-skills (set (repeatedly 2 #(rand-nth constants/skills))) |
| 42 | + :job/required-skills #{} |
41 | 43 | :job/token-type :eth |
42 | | - :job/token-amount 0.69 |
43 | | - :job/token-address "0x1111111111111111111111111111111111111111" |
44 | | - :job/token-id 0 |
| 44 | + :job/token-address "" |
| 45 | + :job/token-amount default-token-amount |
45 | 46 | :job/with-arbiter? false |
46 | 47 | :job/invited-arbiters #{} |
47 | 48 | :job/token-decimals 18}) |
|
119 | 120 | (fn [] [:dispatch [:page.new-job/decimals-response default-decimals]]))] |
120 | 121 | {:fx [(decimals-fx-fn)] |
121 | 122 | :db (-> db |
122 | | - (assoc-in ,,, [state-key :job/token-amount] 1) |
| 123 | + (assoc-in ,,, [state-key :job/token-amount] default-token-amount) |
123 | 124 | (assoc-in ,,, [state-key :job/token-type] token-type))}))) |
124 | 125 |
|
125 | 126 |
|
|
215 | 216 | ::send-create-job-tx |
216 | 217 | (fn [{:keys [db]} _] |
217 | 218 | (let [employer (get-job-creation-param db :employer) |
218 | | - offered-value (get-job-creation-param db :offered-value) |
| 219 | + token-type (get-job-creation-param db :token-type) |
| 220 | + offered-value (cond-> (get-job-creation-param db :offered-value) |
| 221 | + (#{:eth :erc20} token-type) (assoc-in [:token :tokenId] 0)) |
219 | 222 | ipfs-hash (get-job-creation-param db :ipfs-hash) |
220 | 223 | arbiters (get-job-creation-param db :arbiters) |
221 | 224 | tx-opts-base {:from employer} |
222 | | - token-type (get-job-creation-param db :token-type) |
223 | 225 | tx-opts (if (= token-type :eth) |
224 | 226 | (assoc tx-opts-base :value (:value offered-value)) |
225 | 227 | tx-opts-base)] |
|
0 commit comments