Skip to content

Commit

Permalink
add bounty payout wallet connect verification
Browse files Browse the repository at this point in the history
  • Loading branch information
octavioamu committed Jan 8, 2021
1 parent dcdb5fb commit 9fa9940
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/assets/v2/js/pages/bounty_detail/web3_modal.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
const payWithWeb3 = (fulfillment_id, fulfiller_address, vm, modal) => {

const amount = vm.fulfillment_context.amount;
const token_name = vm.bounty.token_name;

if (!provider) {
modal.closeModal();
return onConnect().then(() => {
modal.openModal();
});;
}

if (token_name == 'ETH') {
web3.eth.sendTransaction(
{
Expand Down Expand Up @@ -34,7 +41,7 @@ const payWithWeb3 = (fulfillment_id, fulfiller_address, vm, modal) => {
_alert({ message: gettext('Unable to payout bounty. Please try again.') }, 'error');
console.log(error);
} else {

const payload = {
payout_type: 'web3_modal',
tenant: 'ETH',
Expand Down Expand Up @@ -65,4 +72,4 @@ const payWithWeb3 = (fulfillment_id, fulfiller_address, vm, modal) => {
});
}
}
};
};

0 comments on commit 9fa9940

Please sign in to comment.