Added button to reset local app data
This commit is contained in:
parent
3a8792c730
commit
54acc428aa
19
index.html
19
index.html
@ -111,6 +111,11 @@
|
||||
</header>
|
||||
<section class="grid gap-1-5">
|
||||
<div class="grid gap-1">
|
||||
<div class="grid">
|
||||
<h5>Reset App Data?</h5>
|
||||
</div>
|
||||
<sm-button id='clearLocalData_button' class="danger cta justify-self-start" onclick="clearLocalData()">Reset Data
|
||||
</sm-button>
|
||||
<div class="grid">
|
||||
<h5>My FLO ID</h5>
|
||||
<sm-copy id="user_flo_id" clip-text></sm-copy>
|
||||
@ -546,7 +551,6 @@
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
const render = {
|
||||
transactionCard({ userRole, details, vectorClock }) {
|
||||
const clone = getRef(userRole == 'consumer' ? 'tx-card-1' : 'tx-card-2').content.cloneNode(true).firstElementChild;
|
||||
@ -896,6 +900,19 @@
|
||||
})
|
||||
}
|
||||
|
||||
function clearLocalData(){
|
||||
floDapps.deleteAppData(false).then(r => {
|
||||
localStorage.removeItem("consumer_split");
|
||||
localStorage.removeItem("producer_split");
|
||||
localStorage.removeItem("investor_split");
|
||||
localStorage.removeItem("referrer_split");
|
||||
localStorage.removeItem("technology_provider_split");
|
||||
localStorage.removeItem("total_amount");
|
||||
localStorage.removeItem("total_tokens");
|
||||
location.reload();
|
||||
})
|
||||
}
|
||||
|
||||
async function confirmSubmitForm() {
|
||||
getConfirmation('Confirm', 'Have you crossed checked & confirmed the data is right', "I'll re-check", 'Yes, I have')
|
||||
.then(async (res) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user