Commit Graph

489 Commits

Author SHA1 Message Date
Teemu Patja 8e3762c701
Fix typo causing crash in fault tolerance feature 2017-09-22 19:01:27 +03:00
Teemu Patja 01f09bf671
Uncomment rpc call 2017-09-22 18:21:27 +03:00
Teemu Patja 1432cff096
Add missing gas-limit arg 2017-09-22 18:05:52 +03:00
Teemu Patja 26d30ad91b
Fix gas limit issues introduced by upgrade to geth 1.7.0
* add configurable factor for adjusting gas estimates given by
  json-rpc's eth_estimateGas. This will adjust all gas estimates by
  multiplying json-rpc estimate with the factor.

* use fixed gas limit for deploying bounty contracts to avoid running
  out of gas with geth 1.7.0
2017-09-22 16:52:19 +03:00
Teemu Patja beca021050
Use Ropsten as testnet instead of Rinkeby.
* make token registry contract address configurable
* update documentation
* indicate ropsten usage on github comment
2017-09-21 08:48:57 +03:00
Teemu Patja 0476b8c1ea
Fault tolerance for payout confirmal
* if a payout transaction sent by repo admin from cljs does not get
  mined within 3 hours, consider it as failed and re-enable confirm
  button

Fixes: #94
2017-09-15 10:24:55 +03:00
Teemu Patja c17763bf2d
Fix bug in is-bounty-issue?, update docstring 2017-09-13 11:20:11 +03:00
Teemu Patja 6522265f7d
Never show closed github issues as open bounties
* do not show a bounty issue in open bounties listing or activity feed
  items in case it was closed (manually or via PR)

Fixes: #95
2017-09-13 11:11:37 +03:00
Teemu Patja 640cf8abd6
Usage metrics view access control fix
Allow all members of status-im organization to see Usage metrics view,
instead of just Status team members.
2017-09-11 09:01:34 +03:00
Teemu Patja 11d2c6e4ce
Workaround for smart contract issue related to payouts
If our smart contract is used as designed for payout (first commiteth
bot executes confirmTransaction() with a withdrawEverything call in
payload and then the repo owner calls confirmTransaction() with the
returned tx-id) the contract fails when executing, but confirming
succeeds. Because of this, we now look for contracts that have been
confirmed by both and that still have ETH and/or tokens, and call
executeTransaction() for those.

This needs testing.
2017-08-31 11:33:08 +03:00
Teemu Patja 5ab68f3b18
Fix issues with :confirm-payout re-frame handler 2017-08-31 11:32:45 +03:00
Teemu Patja 9885014235
Typo fix 2017-08-30 11:52:06 +03:00
Teemu Patja 667b3919c4
Handle clients with no web3 correctly
* fix issues with clients that have no wallet connected

Fixes: #92
2017-08-30 11:45:36 +03:00
Teemu Patja 05f1a711c1
Deal with both new and older mist behavior
* try to support both older and new mist for using injected web3
2017-08-29 00:40:13 +03:00
Teemu Patja 3daf6482bf
cljs-web3 related fixes, pt 2 2017-08-29 00:02:34 +03:00
Teemu Patja 071fffbe4d
Fix typed fn name 2017-08-28 23:40:02 +03:00
Teemu Patja bf8039bceb
Fixes for cljs-web3 usage 2017-08-28 23:36:35 +03:00
Teemu Patja 42aa34cfad
Use sha3 from cljs-web.core 2017-08-28 23:23:06 +03:00
Teemu Patja fff720ad71
Use web3 via cljs-web3
* take cljs-web3 to use and no longer rely on window/web3 injected by
  wallet
2017-08-28 23:09:57 +03:00
Teemu Patja 45526810e7
Add function wrapping multisig executeTransaction
* support for calling executeTransaction for a give tx-id in a
  deployed bounty contract
* minor cleanup
2017-08-28 19:58:53 +03:00
Teemu Patja 245b9e1e2a
ClojureScript fixes for payout
* fix broken retrieval of injected web3 function
* specify gas + gasPrice for sendTransaction
* fix data value for confirmTransaction() call
* eliminate hard-coded hex-string
2017-08-28 09:56:23 +03:00
Teemu Patja 453d8a225a
Fix issue in manage bounties view
* spinner for "Confirm" button was showing in some incorrect states
2017-08-28 09:54:56 +03:00
Teemu Patja 808315209f
Add functions for read-only properties of multisig
* add is-confirmed? and get-owners for bounty contracts
2017-08-28 09:52:11 +03:00
Teemu Patja 9bb1a4c9f5
Fix bug in comment generating 2017-08-27 09:43:42 +03:00
Teemu Patja ad3e764191
Fix react warnings 2017-08-26 21:20:04 +03:00
Teemu Patja 92628d040b
Fix bug in payout confirm on backend side + cleanup
* fix parsing of confirmation transaction ID from confirmation event
* remove unused func, improve logging, general cleanup
2017-08-26 14:14:27 +03:00
Teemu Patja a1be68122c
Improve scheduler error handling
* wrap each fn call run-*-tasks in try/catch to avoid losing stack
  trace
2017-08-26 12:11:15 +03:00
Teemu Patja 002946c1fd
Fix possible crash in multisig-wallet/token-balances
* ignore tokens existing in bounty contract if they are not in our
  tokenreg, avoids crash silently leading to token balances not
  gettings saved
2017-08-25 23:59:30 +03:00
Teemu Patja bb5dc7b85a
Minor fix to github comment 2017-08-25 23:07:28 +03:00
Teemu Patja 209ef469a6
Make contract address a link to etherscan
* make contract address a link to etherscan in github comment markdown

Fixes: #91
2017-08-25 23:04:48 +03:00
Teemu Patja 342cefff56
Improve readability of :confirm-payout handler
* clarify use of "magic" hex-string with comment and variable name in
  :confirm-payout handler
2017-08-24 18:31:44 +03:00
Teemu Patja 122f76cffe
Remove unused module 2017-08-24 18:08:34 +03:00
Teemu Patja e1e0be115c
Include USD value for open bounties view items 2017-08-24 17:53:07 +03:00
Teemu Patja 92b51251c0
Show 2 decimals for tokens on comment image 2017-08-24 14:17:37 +03:00
Teemu Patja a091d04bb2
Fix bounties view rendering
* correct typoed key names causing empty values
2017-08-23 23:59:30 +03:00
Teemu Patja 584f742de9
Show tokens, ETH and USD value on UI
* make activity feed items and open bounties view show badges for ETH
  and tokems and total USD in item description
* make top hunters work based on total USD value paid out in bounties
* upgrade lein-cljsbuild
2017-08-23 23:48:59 +03:00
Teemu Patja 2aea7fe742
Test code for PNG rendering 2017-08-23 15:14:18 +03:00
Teemu Patja 2280c34ee8
Improve Github comment 2017-08-23 15:12:53 +03:00
Teemu Patja 881e79477f
Utility functions for transferring ETH and tokens
* implemented some util functions to transfer ETH and ERC20 tokens for
  aiding testing
* add and improve doctrings
2017-08-23 15:11:46 +03:00
Teemu Patja aeb5d08657
Be more explicit about testnet ETH + tokens in comment 2017-08-22 23:34:08 +03:00
Teemu Patja d6aae3fb5e
Render token balances to Github comment image 2017-08-22 23:15:16 +03:00
Teemu Patja 5b639e1f20
Include token balances in Github issue comment 2017-08-22 22:16:45 +03:00
Teemu Patja 9cfd27a0b6
Periodicically update bounty total USD values to DB
* peridic updating of total USD value for open bounties
* support 1 and 10 minute interval tasks in scheduler
2017-08-22 20:31:21 +03:00
Teemu Patja e995769e90
Periodic updating of token balances
* periodically ensure bounty contract internal balances are up to date
* update token balances to DB change detected
2017-08-22 20:09:52 +03:00
Teemu Patja e4124d6bc2
Fix crash in token-balances, fix update-balances
* fix null pointer crash in token-balances
* fix bug in periodic update-balances
2017-08-22 19:45:00 +03:00
Teemu Patja f8d00196d6
DB storage for token balances
* store token bounties to DB when changed
* added some TODOs
2017-08-22 16:45:10 +03:00
Teemu Patja de07f873ab
Get combined balances + total USD value for a bounty
* add function for getting balance of tokens and ETH in a bounty
  contract and total USD value. This data will be kept in sync with
  the DB
* change default gas price 2 -> 20 gwei (still configurable)
2017-08-22 14:49:37 +03:00
Teemu Patja f1cf4c7375
Function for getting all token balances in a multisig 2017-08-22 14:29:52 +03:00
Teemu Patja 9cc524c432
Allow token-data reloading in REPL, refactoring
* expose update-data in eth.token-data
* eliminate code duplication in multisig-wallet
* add compiled contracts to .gitignore
* minor refactoring + cleanup
2017-08-22 12:02:41 +03:00
Ricardo Guilherme Schmidt 03271b6e17 updated addresses 2017-08-22 00:30:33 -03:00
Teemu Patja c9f7013b66
Ignore empty records in token registry
* ignore records with empty TLA when reading tokenreg data
2017-08-21 10:24:14 +03:00
Teemu Patja a2a569f980
More token support changes
* prepare scheduler for updating bounty balances
* fix retrieving of created multisig address
* retrieve token info by address
* fix method-id for watch(address)
2017-08-21 00:30:49 +03:00
Teemu Patja 5f6ad85011
TokenReg clojure support improvements
* allow loading of parity tokenreg contract data from any address,
  including our own test instance
* use tokenreg data from config.edn for testnet only when availaned,
  otherwise from our smart contract on rinkeby
* clean up + refactoring
* remove generated java wrapper for parity tokenreg contract
2017-08-20 22:47:46 +03:00
Teemu Patja b00d30e370
ERC20 related smart contract call clj functions
* functions for querying ERC20 token balance from bounty contract and
  from token contract
* fix several bugs
* web3j related shared code to own module
2017-08-20 21:40:34 +03:00
Teemu Patja 6acc1bfb96
Mount component for holding tokenreg data 2017-08-20 12:22:08 +03:00
Teemu Patja 9c71e37e2a
Make factory contract address configurable 2017-08-20 11:54:11 +03:00
Teemu Patja c52c10e555
Function for finding created multisig address from tx receipt 2017-08-20 11:48:01 +03:00
Ricardo Guilherme Schmidt e83f7f1583 new factory address 2017-08-20 00:48:24 -03:00
Teemu Patja 43ea9b91e0
Fix bug in send-transaction 2017-08-19 21:27:01 +03:00
Teemu Patja 87effb5f6c
eth.core improvements
* add conversion func for (big)int -> hex string
* use integer instead of hex string for gas-price
2017-08-19 12:52:27 +03:00
Teemu Patja c647e4afd4
Read data from parity token registry + fix build
* read data from parity's mainnet token registry contract to a clojure
  map
2017-08-19 12:52:27 +03:00
Teemu Patja 815544ec12
Fix compile error 2017-08-18 15:13:28 +03:00
Teemu Patja 350657a488
Remove duplication
* refactor duplication out of map values
2017-08-17 18:30:24 +03:00
Teemu Patja 7dde94ef65
Fix compile errors
* fix cyclic dependency issue
* fix several compile errors
2017-08-17 17:38:57 +03:00
Teemu Patja 6d7f47df4b
Replace hard-coded hex strings with util fn calls, refactoring
* replace hard-coded hex-strings with
* refactor some clojure code
2017-08-17 16:37:04 +03:00
Ricardo Guilherme Schmidt ee5823a120 owners array getter, better custom tokenlist, interface to new contract 2017-08-17 10:06:14 -03:00
Teemu Patja 902129d639
Utility function for computing topic-id
* added utility function for computing topic ID hex-string from event signature
2017-08-17 14:52:38 +03:00
Teemu Patja 074f510aa5
Un-hardcode another hex method ID 2017-08-17 13:32:59 +03:00
Teemu Patja c0fa786225
Remove unused function 2017-08-17 13:19:01 +03:00
Teemu Patja 8599b67dd9
Eliminate need for hard-coded hex method IDs
* utility function for computing method-id hex string from method
  signature
* use util function in most places (TODO: find out missing hex
  method-id signatures)
2017-08-17 13:11:17 +03:00
Teemu Patja cc36b5bb02
Update dependencies + minor refactoring
* update all dependency libraries to latest
* use ring.util.http-response instead of ring.util.response everywhere
2017-08-17 11:42:08 +03:00
Teemu Patja 2bb7790768
Github comment improvements
* add missing "ETH" to github comment
* use 6 decimals instead of 8 for github comment + image
2017-08-14 13:18:33 +03:00
Teemu Patja 209698c170
Get USD value for token-value map
* get current USD value for an arbirary size token-value map
2017-08-04 12:16:13 +03:00
Teemu Patja f379da4924
Support for getting token USD value
* utility function for getting current USD value of a crypto token
  from cryptonator API
2017-08-04 11:50:51 +03:00
Ricardo Guilherme Schmidt 24e3ae84f1 added to clj 2017-08-03 04:50:22 -03:00
Ricardo Guilherme Schmidt a5a4bec9ef changed function signatures in commiteth 2017-08-02 00:11:12 -03:00
Ricardo Guilherme Schmidt a24170baed erc20-enhanced-wallet 2017-07-31 17:34:17 -03:00
Teemu Patja d435b0b723
Show unmined pending payouts as disabled on UI
Fixes: #70
2017-06-13 19:26:48 +03:00
Teemu Patja 4061f0c5b3
Keep bounty issue titles up-to-date with github
* update changed bounty issue titles at startup
* update changed issue title in issue edited webhook handler

Fixes: #67
2017-06-13 10:26:22 +03:00
Teemu Patja 5c004bbb47
Fix bug in configurable gas price 2017-06-07 16:07:22 +03:00
Ricardo Guilherme Schmidt d30f9f9f01 hardcode gas value at 524288 gas 2017-06-06 18:37:17 -03:00
Ricardo Guilherme Schmidt 57ce1831c8 fix compile error 2017-06-06 17:28:53 -03:00
Ricardo Guilherme Schmidt fc3659e998 remove 1 wei from confirm 2017-06-06 16:13:35 -03:00
Ricardo Guilherme Schmidt 1daa5c342d fixes confirm bug https://github.com/status-im/commiteth/issues/61 2017-06-06 16:13:09 -03:00
Teemu Patja 8a8f531733
Use provided :gas value in send-transaction if given 2017-06-06 21:35:12 +03:00
Teemu Patja 943b0bfdac
Indicate rinkeby usage on github comment when using testnet 2017-06-02 13:35:05 +03:00
Teemu Patja 26bc685f91
Add some debug logging 2017-06-02 13:08:33 +03:00
Teemu Patja a2f788aa71
Use complete for redirect after logout 2017-06-02 12:29:03 +03:00
Teemu Patja 09c448d282
Use complete URL in redirect (fixed testnet login) 2017-06-02 12:17:14 +03:00
Teemu Patja d4d430c1ed
Revert "Add missing require"
This reverts commit f5a4c54920.
2017-06-02 11:01:23 +03:00
Teemu Patja 12671cd2c3
Revert "Testnet usage related fixes"
This reverts commit d8965025d1.
2017-06-02 11:00:28 +03:00
Teemu Patja a90c9569e2
Revert "Use /test URL prefix from CLJS when on testnet"
This reverts commit 3bb8219f49.
2017-06-02 10:59:38 +03:00
Teemu Patja d8965025d1
Testnet usage related fixes 2017-06-01 16:47:12 +03:00
Teemu Patja f5a4c54920
Add missing require 2017-06-01 14:58:04 +03:00
Teemu Patja 3bb8219f49
Use /test URL prefix from CLJS when on testnet
* because we are not using a virtual host for the testnet instance,
  the client AJAX requests must prefix http path with '/test'
2017-06-01 14:37:05 +03:00
Teemu Patja 57f136bdb3
Move testnet setting to config.edn
* use config.edn/environment for on-testnet instead of system property
  to make deployment simpler
2017-06-01 14:26:25 +03:00
Teemu Patja 55cba00fa0 Merge branch 'develop' into develop 2017-06-01 13:36:13 +03:00
Ricardo Guilherme Schmidt f77fa9fea2 updated multisig to enhanced multisig 2017-06-01 01:02:07 -03:00
Teemu Patja 52eb4471fe
Configurable gas price, eth RPC URL
* config params for gas price and geth RPC URL

Fixes: #59
2017-05-31 16:39:29 +03:00
Teemu Patja babca32460
Disable re-deploying of failed contracts
* do not try to automatically re-deploy failed bounty contracts
2017-05-31 11:50:24 +03:00
Teemu Patja 7285987292
Improve recovery mechanism
Only consider un-mined contract deployments older than 1 hour as
failed
2017-05-31 10:44:45 +03:00
Teemu Patja f171259ed4
Recover from bot account ETH balance running out
Recover from situation where Commit ETH bot account's ETH balance runs out and gets replenished by re-deploying contracts that were not actually written to the blockchain.

Fixes: #58
2017-05-31 09:32:46 +03:00
Ricardo Guilherme Schmidt 695e3d14b8 Merge pull request #1 from status-im/develop
Mainnet support
2017-05-30 19:26:51 -03:00
Ricardo Guilherme Schmidt d488169597 added balance-of tokens 2017-05-25 06:30:46 -03:00
Ricardo Guilherme Schmidt bde4627b23 added erc20-transfer 2017-05-25 06:22:48 -03:00
Ricardo Guilherme Schmidt 0d84b80456 removed wei from execute, changed format-call-params to public 2017-05-25 05:51:13 -03:00
Teemu Patja ad2e396ef1
Mainnet support
* show "Mainnet" instead of "Testnet" on github issue comments and web UI
  if commiteth.onTestnet system property is truthy
2017-05-21 11:07:19 +03:00
Teemu Patja d271f555e5
Fix UI glitch 2017-05-04 16:12:29 +03:00
Teemu Patja a0b018ab6c
Show loading spinner for activity feed and bounties view
* show loading spinner instead "no data" text on activity feed view
  and bounties view when data is being fetched
2017-05-04 13:51:00 +03:00
Teemu Patja 098893e0d9 Merge pull request #53 from coopermaruyama/estimate-gas
feat(eth): Estimate gas instead of hard coding.
2017-04-13 12:37:19 +03:00
Teemu Patja 921b86ff7f
Fix repo loading bug, update dependencies
* fix UI getting frozen in manage repos view
* update dependencies
2017-04-13 12:18:39 +03:00
Teemu Patja 2a05a6bef7
Only request user repos when admin token available 2017-04-12 15:28:16 +03:00
Teemu Patja d6aaa2dcea
Fix calls to users/create-user
* remove extraneus parameter to users/create-user in pull_request
  webhook handler (Fixes #54)
* fix db test
2017-04-12 12:36:53 +03:00
Cooper Maruyama 8006646d6d feat(eth): Esimtae gas instead of hard coding.
Closes #19.
2017-04-10 23:15:05 -07:00
Teemu Patja f1146d5a83
Correct UI caption 2017-04-06 23:15:53 +03:00
Teemu Patja 0f3f06c19a
Add missed file 2017-04-06 22:59:50 +03:00
Teemu Patja f391330f58
Usage metrics view for status team members
* status team membership restriction auth-rule
* HTTP API method + db query
* set whole session to nil in /logout
* simple UI view showing chart of registered + active users
2017-04-06 22:52:11 +03:00
Teemu Patja 034dacf29a
"No data" text for empty repo groups
* show "No data" text for repository groups with no repositories
2017-04-03 18:16:40 +03:00
Teemu Patja a7f636c956
Fix regression in add repo feature
Fixes: #51
2017-04-03 12:18:55 +03:00
Teemu Patja 37fe9dec91
Fix activity item small resolution rendering
Related to #50
2017-04-02 20:52:00 +03:00
Teemu Patja e49ad18fd8
Refactoring & cleanup
* fix issues found by lein-kibit
2017-03-29 10:36:44 +03:00
Teemu Patja d47f74693a
Do not load user repos with timer
* load user repositories on Repositories view render (in case admin
  token exists) instead of with interval timer
* remove unused keys from re-frame default-db
2017-03-23 18:32:01 +02:00
Teemu Patja 32dbc257aa
Toggle checkbox for forked repositories
* add toggle checkbox for filtering forked repositories
* cleanup, add TODO

Fixes: #47
2017-03-23 11:46:16 +02:00
Teemu Patja bc27ec000f
Make local-storage tokens keyed by username
* eliminates the possibility of using an access-token for a different
  username than the currently signed in one (this was only possible in
  case the same user is using multiple github accounts on the same machine)
2017-03-23 09:38:41 +02:00
Teemu Patja 3f0ff567a8
Progressive Github permissioning & client-side oauth tokens
* require only user:email oauth scope when signing up
* if user wants to set bounties on repos, request additional oauth
  scopes
* do not store github access tokens on server side and use client-side
  localStorage instead

Fixes: #35
Fixes: #40
2017-03-22 22:20:52 +02:00
Teemu Patja a6690859cc
Show open bounties tab regardless of sign in state 2017-03-22 13:19:36 +02:00
Teemu Patja 35df02edea
Update bounty issue comment on PR merge
* update comment for a bounty issue when a PR is selected as the
  winning claim by merging
* fixed bug in pending-bounties causing first PR referencing a bounty
  issue to be considered as winning claim

Fixes: #44
2017-03-19 22:13:09 +02:00
Teemu Patja 7342dc920f
Add forgotten file 2017-03-19 19:43:29 +02:00
Teemu Patja bf028991e8
Update bounty issue comment after payout
* update bounty issue comment to indicate the bounty has been paid out
* minor refactoring

Fixes: #36
2017-03-19 17:10:56 +02:00
Teemu Patja b4f3d9e5c2
Improve naming 2017-03-19 16:07:42 +02:00
Teemu Patja 882660ad0c
Activity item ui tweaks 2017-03-19 16:07:26 +02:00
Teemu Patja d89938aaab
Add missing ETH text to activity item 2017-03-19 15:37:36 +02:00
Teemu Patja 665903b24d
Avatar fix (#37) 2017-03-17 23:57:02 +02:00
Teemu Patja 027fe6f2fd
Use data from /api/open-bounties (#37) 2017-03-17 23:42:03 +02:00
Teemu Patja 3d7cf03263
#37: add forgotten file 2017-03-17 23:27:51 +02:00
Teemu Patja b25e01f14d
Simple "open bounties" view
* add simple tab for showing all open bounties (#37). Probably needs
  some UX improvements
* rename old "bounties" tab to "manage payouts"
* fix issues in db migration
2017-03-17 23:17:30 +02:00
Teemu Patja 3ba4956a78
Show bounty open & balance update feed items in context of repo
For bounty related activity feed items:
* show full repository name in activity item title instead of admin name
* show owner avatar instead of admin avatar

Fixes: #41
2017-03-16 22:44:34 +02:00
Teemu Patja a3ec1591b5
Show fork icon for forks in repos view 2017-03-16 22:44:34 +02:00
Teemu Patja 05944b5c88
Update dependencies, fix cljsbuild warning 2017-03-16 22:44:34 +02:00
Teemu Patja 23de712604
Embed svg in cljs code
* move external svg image for dropdown into cljs code to avoid extra
  http requests
2017-03-16 22:44:34 +02:00
Teemu Patja 66d6dd37fd
Allow enabling forked repos
(Fixes: #42)
2017-03-15 19:06:27 +02:00
Teemu Patja d17b207064
Remove forgotten debug fn's 2017-03-15 10:12:43 +02:00
Teemu Patja bcae011231
Merge branch 'master' into develop 2017-03-14 22:44:04 +02:00
Teemu Patja 4ba777996e
Fix UI issue when confirming payout
* fix bugs in handlers related to bounty payout confirmation (Fixes: #31)
* reduce println noise
2017-03-14 22:42:29 +02:00
Teemu Patja 89ed67c39a
Update placeholder text 2017-03-14 22:23:42 +02:00
Teemu Patja a9b6a28dec
Add 'repos' oauth scope
* repos scope is needed even for read-only access to the user's
  repositories, so it is required for manage repositories to work

(Related to #29)
2017-03-14 18:41:02 +02:00
Teemu Patja 34615a6f92
Footer enhancements 2017-03-14 17:38:50 +02:00
Teemu Patja f0f7bf9c7d
Scheduled task for re-deploying failed bounty contracts
* as a secondary pre-caution, look for bounty issues where the deploy
  contract transaction has failed and re-deploy the contract

(Fixes #32)
2017-03-12 19:50:05 +02:00
Teemu Patja 3a29a577de
Remove forgotten debug fn's 2017-03-10 20:27:11 +02:00
Teemu Patja cb3feeeec3
Use random json-rpc request IDs
* use a random 0-4096 int for json-rpc request ID and ensure reponse
  has the same ID (may solve #32))
2017-03-10 20:23:14 +02:00
Teemu Patja 01f1bffd77
Store payout receipt as postgresql jsonb
* store bounty payout receipt as a jsonb object in the database
  instead of a varchar containing json
2017-03-10 20:23:14 +02:00
Teemu Patja 2bd5685638
Use random json-rpc request IDs
* use a random 0-4096 int for json-rpc request ID and ensure reponse
  has the same ID (may solve #32))
2017-03-10 20:19:35 +02:00
Teemu Patja 219d697fee
Store payout receipt as postgresql jsonb
* store bounty payout receipt as a jsonb object in the database
  instead of a varchar containing json
2017-03-09 21:50:57 +02:00
Teemu Patja 2d788cad32
Fix issues with showing version footer in uberjar
* re-implement getting git HEAD sha to cljs side due to system
  properties not containing project version in uberjar profile
2017-03-09 15:47:29 +02:00
Teemu Patja 817466c636
Show commiteth version in page footer
* inject commit sha to project version and make it visible in cljs
* show commiteth version (commit sha) in page footer with a link to github
* downgrade snapshot versions of dependencies to last stable version
2017-03-09 09:49:22 +02:00
Teemu Patja edc547b9ab
Fix broken link to github issue
Fixes: #27
2017-03-08 22:44:30 +02:00
Teemu Patja e6e62d3adc
Indicate signing bounties not possible without web3
* show a warning div informing that signing off bounties is not
  possible without a connected wallet (Fixes #28)
2017-03-08 22:35:55 +02:00
Teemu Patja 8aa7c87835
Remove "repo" oauth scope
* remove "repo" from required permissions (fixes: #29)
* formatting
2017-03-08 22:06:15 +02:00
Teemu Patja 6e60802803
Ignore comments in PR body + unit test
* ignore markdown comments in PR body
* unit test coverage for issue-id extraction from PR webhook
2017-03-08 21:42:52 +02:00
Teemu Patja 0c52b24b51
Improve github comment text 2017-03-07 13:41:56 +02:00
Teemu Patja a8f2d1c1ab
Handle empty payout address case gracefully
* log error instead of crashing if a bounty issue gets merged and bounty
winner has no address
2017-03-06 20:47:17 +02:00
Teemu Patja c93326e874
Post "deploying contract" image
Post a PNG image informing that the bounty contract is being deployed
immediately after bounty label.

Fixes: #26
2017-03-06 20:33:42 +02:00
Teemu Patja a3a7ac915b
Indicate testnet usage, fix comment image export
Fixes: #25
2017-03-06 17:46:31 +02:00
Teemu Patja f2c74fe4e7
Fix crash in case webhook with nil url exists for a repo 2017-03-06 15:11:54 +02:00
Teemu Patja bb9ae35fd5
Log proper stack trace in case toggling repo throws 2017-03-06 14:25:26 +02:00
Teemu Patja e6def5b3f8
Fix crash when receiving a webhook POST for unknown repo 2017-03-06 14:07:19 +02:00
Teemu Patja 317247e31a
Merge branch 'develop' 2017-03-06 12:56:01 +02:00
Teemu Patja b69a6f5728
Scheduler logging fix & fix 500 error for unexpected webhook
* log exception in case scheduled task fails
* return 403 response in case validating webhook POST secret fails
* add logging
2017-03-06 12:55:39 +02:00
Teemu Patja f8e7677c9e
Make swagger-ui available only for dev profile 2017-03-04 13:01:32 +02:00
Teemu Patja 1107ed71e7
Fix REPL reload issues with db and http-server 2017-03-04 12:42:12 +02:00
Teemu Patja 22d1fcc517
New scheduler implementation
* simpler and more REPL-friendly scheduler implementation
2017-03-03 23:24:31 +02:00
Teemu Patja 5cdc524c1b
Fix bug in pull request webhook handler 2017-03-03 21:37:12 +02:00
Teemu Patja 366b0f6a7a
Simplify QR image get handler 2017-03-03 17:02:58 +02:00
Teemu Patja 716856830b
Github comment image related fixes and improvements
* fix crash with QR image GET request for non-existing image/bounty
* take comment hash verifcation back to use
* improve QR handler error handling
* add missing parameter to function call
2017-03-03 16:27:47 +02:00
Teemu Patja 442f5c7821
Require Ethereum address for toggling repos
* do not allow toggling of repositories without a saved Ethereum
  address (Fixes: #20)
* fix react warning on activity view
* fix bugs in payout related re-frame handlers
* project file tweaks
2017-03-03 10:19:28 +02:00
Teemu Patja 9f010648aa
Error handling improvements, #22 fix & more
Error handling improvements
* show error message on UI in case repo toggling fails
* eliminate possibility of creating multiple webhooks

Store comment PNG for all balances of a bounty (Fixes: #22)
* include balance in computation of verification hash for image request
* store hash in db

Refactoring
* use 'owner' for a repo owner everywhere instead of 'login'

Minor
* move cider dependencies to top-level in project file to avoid errors
  with tests and migratus
2017-03-02 10:51:18 +02:00
Teemu Patja 51ccf7ce34
Fixed bug related to org owned repos
* store org name as owner instead of logged in user when toggling a
  repo
2017-03-01 15:54:29 +02:00
Teemu Patja f125bd6244
Fix issue URL in activity feed 2017-03-01 10:35:16 +02:00
Teemu Patja 07b61ee9c8
Add content-type to json-rpc post to make parity happy 2017-02-28 20:22:13 +02:00
Teemu Patja 6e108a088d
Make uberjar nrepl emacs friendly
* replace luminus nrepl with cider nrepl
+ minor cleanup
2017-02-28 14:03:33 +02:00
Teemu Patja 211cc96c90
Activity feed + UI tweaks
* finish missing parts of activity feed feature
* render time ago labels with moment.js
* css tweaks
2017-02-27 22:38:41 +02:00
Teemu Patja 2599b85d41
WIP: Activity feed feature
* backend support for activity feed
* partial frontend support (still needs work)
* save issue modification timestamp to db
* rename commit-id -> commit-sha everywhere for consistency
* "No data" texts for UI collections when no data exists
2017-02-26 23:43:57 +02:00
Teemu Patja c33fb858f9
"Top Hunters" feature + more
* frontend + backend support for top hunters
* fix issues with bounties view
* logging
* cleanup
2017-02-26 16:14:39 +02:00
Teemu Patja 9149a5a985
Store bounty balances as decimal instead of 0x string 2017-02-25 14:44:29 +02:00
Teemu Patja 9cb48b5183
Bounties view + related backend functionality & more
Changes to bounty/pull-request data model and logic
* save git sha of pull request's HEAD instead of possible merge commit
  and save it for opened, merged and closed events
* only look for bounties being accepted in pull-request closed via
  merge events (no need for compilicated logic with issue-closed event)
* pull_request now has issue_id column to make many sql queries
  simpler

Frontend
* owner-bounties app-db structure changes
* bounties view with confirm pending payout UI

Other
* removed lots of unused legacy code
* bug fixes + refactoring
* added comments + TODOs
2017-02-25 00:15:44 +02:00
Teemu Patja ec5f07a578
DB query refactoring, save PRs also when opened
* store pull-requests to DB also when opened instead of only when
  merged to allow for showing bounty claims
* refactor SQL queries
* look for PR keywords also in title
* improve PR keyword regexes
2017-02-24 11:05:13 +02:00
Teemu Patja 1ad6fb3b93
Inline logo svg, remove old svg's 2017-02-23 18:52:14 +02:00
Teemu Patja 9cb1028c16
Debug logging 2017-02-23 13:48:11 +02:00
Teemu Patja b112155134
Add debug logging, add forgotten column constraint 2017-02-23 13:23:20 +02:00
Teemu Patja 2d2d11fc9d
Fix issues with injected web3 and advanced cljs compilation
* use stub js for web3 externs
* upgrade clojurescript

Fixes: #21
2017-02-23 12:26:29 +02:00
Teemu Patja 66a65277ae
Remove broken + unneeded /docs route 2017-02-22 22:54:48 +02:00
Teemu Patja 0b69459638
Do not checksum validate address by default
* make checksum validation optional in valid-address?
* update test
2017-02-22 21:51:47 +02:00
Teemu Patja b868996308
Do not expose user's email addresses to client side, rename parameter 2017-02-22 19:46:11 +02:00
Teemu Patja c2065fa973
Improve repo loading error handling + UI tweaks 2017-02-22 11:57:38 +02:00
Teemu Patja 1d49767da9
Repositories view improvements
* show personal repos group before other groups
* CSS tweaks
2017-02-22 11:31:38 +02:00
Teemu Patja 32392a4405
Fix bug caused by stale session
* in case API AJAX calls start failing, make sure user is logged out
  to avoid frontend being in a corrupt state
2017-02-22 10:56:14 +02:00
Teemu Patja f932b3705d
Do not leak Github API access token to client side 2017-02-22 10:47:53 +02:00
Teemu Patja 89475a9365
Close success flash messages via delayed dispatch 2017-02-21 23:00:53 +02:00
Teemu Patja 4e627be1e0
UX improvements + address validation
* error/success flash notification support
* disable spellcheck for address editbox
* validate user's Ethereum address when saving
* update button state styles
2017-02-21 21:43:35 +02:00
Teemu Patja 1663669163
Ethereum address validation + unit test
* utility function for validate Ethereum addresses
* unit test
2017-02-21 21:41:39 +02:00
Teemu Patja d5ebf3b0bc
Fix glitch with responsive grid 2017-02-21 15:05:28 +02:00
Teemu Patja f383ab9a0d
Fix build errors + problem with webhook routes
* remove unnecessary servlet context middleware
* do not apply unnecessary ring middleware to webhook routes
2017-02-21 14:55:40 +02:00
Teemu Patja 9b972625e0
Rewrite Github comment PNG functionality
* removed old swing JEditorPane based html to png rendering due to
  it's lack of support for modern css
* new implementation uses wkhtmltoimage (on prod server via wrapper
  script using xvfb)
* no longer generating image on every GET request for QR, but rather
  generating image when a bounty is cretaed or contract balance
  changes
* images stored to DB
* comment image design updated according to UI spec
2017-02-21 10:49:25 +02:00
Teemu Patja bb5d492631
Activity feed view
* beginnings of activity feed reagent UI
* uses place holder data for now
* CSS + other UI tweaks
2017-02-20 17:03:01 +02:00
Teemu Patja b8facb1a97
"Top hunters" UI
* front end support for "top hunters"
* placeholder data used for now
2017-02-19 19:52:22 +02:00
Teemu Patja 7ce1dc6cdc
Fix bug in handle-issue-labeled + logging 2017-02-19 14:33:02 +02:00
Teemu Patja 0fef7d931d
Add forgotten file 2017-02-19 14:32:13 +02:00
Teemu Patja 416178cf0a
Guard against invalid QR code requests 2017-02-19 11:01:02 +02:00
Teemu Patja 97c7800e4d
CSS tweaks 2017-02-18 23:36:29 +02:00
Teemu Patja e265e967e2
Fix regression + UI tweaks 2017-02-18 22:46:59 +02:00
Teemu Patja 354c262301
New 'update address' view
* show web3.eth.accounts in dropdown in case web3 available, otherwise
  edit box
2017-02-18 22:43:11 +02:00
Teemu Patja d35b794ca4
New UX, webhook securing, atomic repo toggling etc.
Secure Github webhooks (Fixes #18)
* Use a unique random secret for webhooks
* Validate payload signature when receiving webhook

Make enabling + disabling a repo more robust
* store repository state instead of enabled flag in DB
* atomic toggle UI button (Fixes #17)

New UX for managing repos
* group repos by owner
* look and feel according to UI spec

General improvements
* only request user's repos via Github API once per session
* fix issue with cljs code figwheel reload
* simplify app-db structure
2017-02-18 11:07:51 +02:00
Teemu Patja 6e646280c2
WIP: new UX
* semantic UI + less based UI styling
* header, tabs, user-profile component
* store avatar URL in DB, show image in user
* unify :user and :user-profile in app-db for simplicity
2017-02-12 22:25:32 +02:00
Teemu Patja 6fc8702a34
Move inline SVG hiccup to separate module 2017-02-11 14:53:32 +02:00
Teemu Patja e29dc1ae8a
Do not render manage page when not logged in 2017-01-30 21:57:03 +02:00
Teemu Patja 993b2a5064
Fix 'unknown prop' react warning 2017-01-30 21:34:12 +02:00
Teemu Patja c60db00f6d
Reorganize API endpoints 2017-01-30 21:26:02 +02:00
Teemu Patja fb136e656d
Show spinner when repos are loading 2017-01-30 21:06:17 +02:00
Teemu Patja 19de39d946
Add missed file 2017-01-30 17:57:23 +02:00
Teemu Patja 40f3bc0de4
Move gzip middleware to a better place 2017-01-30 17:45:45 +02:00
Teemu Patja 7f90f38b1e
Gzip compress all HTTP content 2017-01-28 09:29:22 +02:00
Teemu Patja 8812157789
Optimization: only provide needed repo map keys 2017-01-28 09:12:08 +02:00
Teemu Patja a4aafa1bd3
Enable re-frisk for dev profile 2017-01-28 08:24:05 +02:00
Teemu Patja c12e5d1311
Contract-address to comment field + disable QR image caching
* include contract address in github comment
* set cache-control: no-cache header for QR image response to avoid
  caching on Github's side. Also no longer including balance in
  comment hash function.

Fixes: #16
2017-01-22 12:26:32 +02:00
Teemu Patja 985b72754d
Create bounties for existing issues when enabling a repository
* Create bounties for existing bounty-tagged issues when a repository is
toggled on
* added commiteth.bounties ns for sharing code

Fixes: #12
2017-01-22 11:10:40 +02:00
Teemu Patja f89a83ea32
Create github issue label with different color 2017-01-22 07:57:05 +02:00
Teemu Patja 1c26d17ad9
Run pending DB migrations at startup
Run pending DB migrations at startup to make deployement
simpler (eliminates need to clone repo and run "lein migratus migrate"
on the server)
2017-01-21 19:14:12 +02:00
Teemu Patja 5d704b626e
Fix QR image update issue
Previously the QR image did not get updated when the contract balance
changed and we generated a new one. This happened because Github
caches external images and our image's URL did not change after
updating. Now we generate the QR image hash based on also the balance,
so the URL changes when balance is updated.

Fixes: #13
2017-01-20 23:34:50 +02:00
Teemu Patja b3909f4e60
Fix saving of users' email
Previously the user's email did not get saved to the db unless it was
defined as public in the profile. This commit adds an additional oauth
scope for accessing the user's emails, and the user's primary email
address is saved to the db.
2017-01-20 23:34:40 +02:00
Teemu Patja 480d85f6b5
Fix bugs in ethereum module
* Fix geth json-rpc errors caused by non-hex encoded integer
  parameters and nil :to parameter
* use personal_getTransaction instead of
  personal_signAndSendTransaction used by geth < 1.5
2017-01-20 20:36:24 +02:00
Teemu Patja 60cc76919e
Add support for using org repos
Now repositories are shown with their full name ('<org/user>/repo'
instead of 'repo') and it is possible to add bounties for both
user repositories and organization repositories. Using org repos
requires the user to have admin rights to the repo.
2017-01-20 20:36:18 +02:00
kagel e68891a936 `send` button now reflects tx status + display some errors 2016-10-04 03:13:43 +03:00
kagel feccbcce72 Refresh data every minute, please 2016-10-02 18:06:12 +03:00
kagel 401f8dcf8c Fix multisig wallet payout flow 2016-10-01 15:29:18 +03:00
kagel 1110f5817d Fix tentacles edit-comment method 2016-09-30 20:10:33 +03:00
kagel 369d45ef51 Fix multisig wallet `execute` method 2016-09-30 20:02:28 +03:00
kagel 4a009a09e8 Strange Mist behaviour workaround 2016-09-30 01:52:40 +03:00
kagel e8375418d7 Wildfly workaround: reuse named scheduler thread between deployments 2016-09-29 17:27:20 +03:00
kagel e65fabf60e Pagination 2016-09-28 04:12:33 +03:00
kagel 161b5b8052 Remove assignee and comments count 2016-09-26 01:56:00 +03:00
kagel c064c04b46 Remove table header 2016-09-26 01:50:02 +03:00
kagel 833953edc6 Update multisig wallet contract code 2016-09-25 14:49:18 +03:00
kagel 49dcdc0515 Confirm multisig transaction using web3 2016-09-22 03:45:06 +03:00
kagel 6d8ad78bfd Display balance in ETH + stop scheduler threads on exit 2016-09-22 03:45:06 +03:00
kagel 0affe53a45 React warnings 2016-09-22 03:45:06 +03:00
kagel 4079bd398d New look 2016-09-19 23:26:57 +03:00
kagel bce7ef436a Various bugfixes:
* extra newline in contract data
* insufficient gas
* wrong headless image generation
* stop scheduler threads on exit
etc.
2016-09-18 23:43:38 +03:00
kagel 4618662203 Another bugfix 2016-09-15 17:56:29 +03:00
kagel 7ffc9741de Bugfix in handle-issue-closed 2016-09-15 17:39:50 +03:00
kagel 88ed27d100 More logs please 2016-09-15 00:35:50 +03:00