Skip to content

Commit

Permalink
fix approve calculation and new grants, add quill
Browse files Browse the repository at this point in the history
  • Loading branch information
danlipert committed Jun 11, 2019
1 parent f1a8f71 commit ea36a42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/assets/v2/js/grants/fund.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ $(document).ready(function() {
} else if (data.contract_version == 0) {
console.log('grant amount: ' + grant_amount);
console.log('gitcoin grant amount: ' + gitcoin_grant_amount);
realApproval = Number(((grant_amount * data.num_periods) + gitcoin_grant_amount) * Math.pow(10, decimals) + 1 );
// don't need to approve for gitcoin_grant_amount since we will directly transfer it
realApproval = Number(((grant_amount * data.num_periods)) * Math.pow(10, decimals) + 1 );
}
//}

Expand Down Expand Up @@ -210,7 +211,7 @@ $(document).ready(function() {
// call splitter after approval
splitPayment(accounts[0], data.admin_address, gitcoinDonationAddress, Number(grant_amount * Math.pow(10, decimals)).toLocaleString('fullwide', {useGrouping: false}), Number(gitcoin_grant_amount * Math.pow(10, decimals)).toLocaleString('fullwide', {useGrouping: false}));
} else {
if (gitcoin_grant_amount > 0) {
if (data.contract_version == 0 && gitcoin_grant_amount > 0) {
donationPayment(deployedToken, accounts[0], Number(gitcoin_grant_amount * Math.pow(10, decimals)).toLocaleString('fullwide', {useGrouping: false}));
}
subscribeToGrant(transactionHash);
Expand Down
3 changes: 3 additions & 0 deletions app/grants/templates/grants/newv0.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
{% include 'shared/cards.html' %}
<link rel="stylesheet" href="{% static "v2/css/grants/new.css" %}">
<link rel="stylesheet" href="{% static "v2/css/bounty.css" %}">
<script src="//cdn.quilljs.com/1.3.6/quill.min.js"></script>
<link href="//cdn.quilljs.com/1.3.6/quill.bubble.css" rel="stylesheet">
<link href="//cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
</head>
<body class="interior {{ active }} grant g-font-muli">
{% include 'shared/tag_manager_2.html' %}
Expand Down

0 comments on commit ea36a42

Please sign in to comment.