create-mn-app 0.3.27 → 0.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -97,7 +97,16 @@ async function main() {
|
|
|
97
97
|
const { wallet, unshieldedKeystore } = await createWallet(seed);
|
|
98
98
|
|
|
99
99
|
console.log(' Syncing with network...');
|
|
100
|
+
console.log(' ℹ This may take several minutes depending on network size.');
|
|
101
|
+
console.log(' RPC disconnection messages during sync are normal and can be safely ignored.\n');
|
|
102
|
+
const syncStart = Date.now();
|
|
103
|
+
const syncInterval = setInterval(() => {
|
|
104
|
+
const elapsed = Math.round((Date.now() - syncStart) / 1000);
|
|
105
|
+
process.stdout.write(`\r ⏳ Still syncing... (${elapsed}s elapsed) `);
|
|
106
|
+
}, 5000);
|
|
100
107
|
const state = await wallet.waitForSyncedState();
|
|
108
|
+
clearInterval(syncInterval);
|
|
109
|
+
process.stdout.write('\r ✓ Synced with network. \n');
|
|
101
110
|
|
|
102
111
|
const address = unshieldedKeystore.getBech32Address();
|
|
103
112
|
const tNightBalance = state.unshielded.balances[unshieldedToken().raw] ?? 0n;
|
|
@@ -169,7 +169,16 @@ async function main() {
|
|
|
169
169
|
const walletCtx = await createWallet(seed);
|
|
170
170
|
|
|
171
171
|
console.log(' Syncing with network...');
|
|
172
|
+
console.log(' ℹ This may take several minutes depending on network size.');
|
|
173
|
+
console.log(' RPC disconnection messages during sync are normal and can be safely ignored.\n');
|
|
174
|
+
const syncStart = Date.now();
|
|
175
|
+
const syncInterval = setInterval(() => {
|
|
176
|
+
const elapsed = Math.round((Date.now() - syncStart) / 1000);
|
|
177
|
+
process.stdout.write(`\r ⏳ Still syncing... (${elapsed}s elapsed) `);
|
|
178
|
+
}, 5000);
|
|
172
179
|
const state = await walletCtx.wallet.waitForSyncedState();
|
|
180
|
+
clearInterval(syncInterval);
|
|
181
|
+
process.stdout.write('\r ✓ Synced with network. \n');
|
|
173
182
|
const balance = state.unshielded.balances[unshieldedToken().raw] ?? 0n;
|
|
174
183
|
console.log(` Balance: ${balance.toLocaleString()} tNight\n`);
|
|
175
184
|
|
|
@@ -255,7 +255,16 @@ async function main() {
|
|
|
255
255
|
const walletCtx = await createWallet(seed.trim());
|
|
256
256
|
|
|
257
257
|
console.log(' Syncing with network...');
|
|
258
|
+
console.log(' ℹ This may take several minutes depending on network size.');
|
|
259
|
+
console.log(' RPC disconnection messages during sync are normal and can be safely ignored.\n');
|
|
260
|
+
const syncStart = Date.now();
|
|
261
|
+
const syncInterval = setInterval(() => {
|
|
262
|
+
const elapsed = Math.round((Date.now() - syncStart) / 1000);
|
|
263
|
+
process.stdout.write(`\r ⏳ Still syncing... (${elapsed}s elapsed) `);
|
|
264
|
+
}, 5000);
|
|
258
265
|
const state = await walletCtx.wallet.waitForSyncedState();
|
|
266
|
+
clearInterval(syncInterval);
|
|
267
|
+
process.stdout.write('\r ✓ Synced with network. \n');
|
|
259
268
|
const address = walletCtx.unshieldedKeystore.getBech32Address();
|
|
260
269
|
const balance = state.unshielded.balances[unshieldedToken().raw] ?? 0n;
|
|
261
270
|
|