fwd/nano-to

Checkout address sliced incorrectly

Closed this issue · 3 comments

In the checkout panel one character from the checkout address is missing (where sliced for vanity highlighting).
The javascript slice function works as follows:
slice(indexStart) or slice(indexStart, indexEnd)
where
indexStart: The index of the first character to include in the returned substring.
indexEnd: The index of the first character to exclude from the returned substring.

In index.html line 307 the slicing is done like this:

checkout.address.slice(0, 12)
checkout.address.slice(12, 58)
checkout.address.slice(59, 99)

but should be

checkout.address.slice(0, 12)
checkout.address.slice(12, 59)
checkout.address.slice(59, 99)

or

checkout.address.slice(0, 12)
checkout.address.slice(12, 59)
checkout.address.slice(59)

The same issue is found in app.js line 1396 with the suggestion address.

Fantastic bug catch.

Provide nano address for 1 NANO on me.

Wow, that's generous, thank you!
nano_3wywy8w6e5y37edxdd1yuh1pprj7e9c8kza8d5inej6xswge619bihoot9hm