Show "Remove my Poll" modal window (#2461)
It's just a question and a simple contract call, actually. Co-Authored-By: Anatoly Nikiforov <anatolyniky@gmail.com>staking
parent
af61d02b6d
commit
21d88a2beb
@ -0,0 +1,11 @@ |
|||||||
|
import { openQuestionModal } from '../../lib/modals' |
||||||
|
import { makeContractCall } from './utils' |
||||||
|
|
||||||
|
export function openRemovePoolModal (store) { |
||||||
|
openQuestionModal('Remove my Pool', 'Do you really want to remove your pool?', () => removePool(store)) |
||||||
|
} |
||||||
|
|
||||||
|
async function removePool (store) { |
||||||
|
const contract = store.getState().stakingContract |
||||||
|
makeContractCall(contract.methods.removeMyPool(), store) |
||||||
|
} |
@ -0,0 +1,6 @@ |
|||||||
|
<span class="stakes-btn-remove-pool js-remove-pool <%= if assigns[:extra_class] do @extra_class end %>"> |
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"> |
||||||
|
<path fill-rule="evenodd" d="M13 5h-1v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5H1a1 1 0 0 1 0-2h3V1a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2h3a1 1 0 0 1 0 2zM8 2H6v1h2V2zm2 3H4v7h6V5z"/> |
||||||
|
</svg> |
||||||
|
<span class="stakes-btn-remove-pool-text"><%= @text %></span> |
||||||
|
</span> |
Loading…
Reference in new issue