Removing address check while parsing to enable user comfort

This commit is contained in:
Vivek Teega 2019-04-13 19:42:53 +05:30
parent 1dab4f10cc
commit e59530154a
4 changed files with 41 additions and 25 deletions

View File

@ -4,7 +4,8 @@
position: absolute;
display: block;
margin: 0 auto;
right: 0;
right: 10px;
top: 10px;
}
.morph-button > button {
@ -18,7 +19,8 @@
font-weight: 700;
line-height: 80px;
overflow: hidden;
right: 0;
right: 10px;
top: 10px;
}
.morph-button.open > button {

View File

@ -123,6 +123,16 @@
font-size: 1.5em;
}
.content-style-overlay li {
margin: 0 auto;
padding: 10px 0;
max-width: 625px;
text-align: justify;
font-weight: 300;
font-size: 1.5em;
}
.content-style-overlay .icon-close {
border: 2px solid #f9e1c9;
border-radius: 50%;

View File

@ -49,17 +49,25 @@
<div class="content-style-overlay">
<span class="icon icon-close">Close the overlay</span>
<h2>What is token tester?</h2>
<p>FLO Token Tester is part of the Token creation and transfer system on the FLO blockchain. FLO blockchain allows for 1024 characters of plaintext to be put in the public ledger with a simple transaction. The characters, which are called FLO data, enable to extend the satoshi blockchain design to further use cases</p>
<p>You can create tokens by simply writing the following as FLO data:<br><br>
<b><i>Create 21 million tokens with name alphacoin#</i></b>
<br>or<br> 
<b><i>Start alphacoin# token system with 21 million tokens</i></b></p>
<p>You can transfer tokens by simply writing the following as FLO data:<br><br>
<b><i>Send 500 alphacoin# to FLOAddress$</i></b>
<br>or<br> 
<b><i>Transfer 500 alphacoin# to FLOAddress$</i></b></p>
<p>In this system there is no need for technical code to be written. Everyone would be able to create and launch their own token systems, without knowing any kind of programming.</p>
<p>You can test if the FLO data you will enter to create or transfer tokens is valid using the Token Tester. Go ahead!</p>
<p>Try the following</p>
<ul>
<li>Create 21 million tokens with name alphacoin#</li>
<li>Start alphacoin# token system with 21 million tokens</li>
<li>Begin a token system called alphacoin# with initial supply of 21 million tokens</li>
<li>100 alphacoin# transfer</li>
<li>alphacoin# 100 transfer to Sherlock</li>
<li>alphacoin# give 100 to Sherlock</li>
<li>SEND 100 COINS OF ALPHACOIN# TO SHERLOCK</li>
</ul>
<p>If the result is noise then the text cannot be used inside FLO Blockchain for token creation and transfer</p>
<p>If the result is succesful parsing of all fields, then it is safe to use the text inside the FLO Blockchain</p>
<p>You can try any other combination you can think of</p>
<p>For more details, MEDIUM ARTICLE AND OTHER LINKS HERE</p>
</div>
</div>
</div>

View File

@ -194,14 +194,12 @@
parsed_data = { 'type': 'noise', 'flodata': nospacestring };
} else if (incorporation && !transfer) {
var initTokens = extractInitTokens(cleanstring);
var address = extractAddress(nospacestring);
if (initTokens != 0 && address != 0) {
if (initTokens != 0) {
parsed_data = {
'type': 'tokenIncorporation',
'flodata': cleanstring,
'flodata': nospacestring,
'tokenIdentification': hashList[0].slice(0, hashList[0].length - 1),
'tokenAmount': initTokens,
'address': address.slice(0, address.length - 1)
'tokenAmount': initTokens
};
} else {
parsed_data = { 'type': 'noise', 'flodata': nospacestring };
@ -211,15 +209,13 @@
// todo Rule 31 - Extract number of tokens to be sent and the address to which to be sent, both data is mandatory
else if (!incorporation && transfer) {
var amount = extractAmount(cleanstring, hashList[0].slice(0, hashList[0].length - 1));
var address = extractAddress(nospacestring);
if (amount != 0 && address != 0) {
if (amount != 0) {
parsed_data = {
'type': 'transfer',
'transferType': 'token',
'flodata': cleanstring,
'flodata': nospacestring,
'tokenIdentification': hashList[0].slice(0, hashList[0].length - 1),
'tokenAmount': amount,
'address': address.slice(0, address.length - 1)
'tokenAmount': amount
};
} else {
parsed_data = { 'type': 'noise', 'flodata': nospacestring };
@ -496,9 +492,9 @@
ol.setAttribute("class", "fs-fields");
if (result['type'] == 'transfer') {
var fieldnames = [ { 'Type': 'Transfer' }, { 'Token name': result['tokenIdentification'] }, { 'Transfer amount': result['tokenAmount'] }, { 'Receiver\'s FLO Address': result['address'] }, {'Original FLO data': result['flodata'] }]
var fieldnames = [ { 'Type': 'Transfer' }, { 'Token name': result['tokenIdentification'] }, { 'Transfer amount': result['tokenAmount'] }, {'Original FLO data': result['flodata'] }]
} else if (result['type'] == 'tokenIncorporation') {
var fieldnames = [{ 'Type': 'Incorporation' }, { 'Token name': result['tokenIdentification'] }, { 'Transfer amount': result['tokenAmount'] }, {'Original FLO data': result['flodata'] }]
var fieldnames = [{ 'Type': 'Incorporation' }, { 'Token name': result['tokenIdentification'] }, { 'Incorporation amount': result['tokenAmount'] }, {'Original FLO data': result['flodata'] }]
} else {
var fieldnames = [{ 'Type': 'Noise' }, {'Original FLO data': result['flodata'] }]
}