Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Changes unnecessary long strings to "".repeat() #714

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ui/js/iota.crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Bundle.prototype.addEntry = function(signatureMessageLength, address, value, tag
Bundle.prototype.addTrytes = function(signatureFragments) {

var emptySignatureFragment = '';
var emptyHash = '999999999999999999999999999999999999999999999999999999999999999999999999999999999';
var emptyHash = '9'.repeat(81);
var emptyTag = '9'.repeat(27);
var emptyTimestamp = '9'.repeat(9);

Expand Down Expand Up @@ -1743,7 +1743,7 @@ Multisig.initiateTransfer = function(input, remainderAddress, transfers, callbac
var timestamp = Math.floor(Date.now() / 1000);

// If no tag defined, get 27 tryte tag.
tag = transfers[i].tag ? transfers[i].tag : '999999999999999999999999999';
tag = transfers[i].tag ? transfers[i].tag : '9'.repeat(27);

// Pad for required 27 tryte length
for (var j = 0; tag.length < 27; j++) {
Expand Down