Skip to content

Commit

Permalink
[Network] New Network model (#219)
Browse files Browse the repository at this point in the history
* New Network sync model

* Wallet speed up + remove some logs

* temporary fix wallet not loaded until unlocked

* fix

* Remove a bunch of await/async

* Remove more awaits

* Add loading animation on sync

* Remove console.logs

* Remove unused mempool variables

* Remove another unused variable

* Await for full sync and use correct sort

* Remove double import

* merge fix again

* prettier

* Add template to translations

* Use optional chain

* fix promo codes

* On toggle testnet reset activity before loading the wallet

* Don't freeze the wallet on start

* Add text progress bar

* Add alerts at beginning and end of sync

* Kitty's patch + my self review

* Use safe fetch and update activity

* remove lastindex

* improve safe fetch

* removed useless variable

* review fix

* review fix2

* remove a bunch of async/await

* Remove more await

* Move reset functions out of resetmasterkey

* Set fullSynced = true for new generated wallets

* Duddino's patch + remove try catch

* Fix empty activity
  • Loading branch information
panleone authored Oct 21, 2023
1 parent 3732997 commit fb38a47
Show file tree
Hide file tree
Showing 21 changed files with 623 additions and 568 deletions.
5 changes: 4 additions & 1 deletion locale/de/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ export default {
secureYourWallet: 'Verschlüssel deine Geldbörse', //Secure your wallet
unlockWallet: 'Entsperre deine Geldbörse', //Unlock wallet
lockWallet: 'Sperre deine Geldbörse', //Lock wallet
syncStatusHistoryProgress: '', //Syncing History Chunks {current} of {total}
syncStatusStarting: '', //<b>Your wallet is syncing!</b><br>You\'ll be able to use it fully once this is complete.
syncStatusFinished: '', //<b>Sync Finished!</b><br>Your wallet is ready to use!

// Encrypt wallet
encryptWallet: 'Verschlüssel deine Geldbörse', //Encrypt wallet
Expand Down Expand Up @@ -232,7 +235,7 @@ export default {
activitySentToSelf: 'Umbuchung', //Self
activityShieldedAddress: 'Geschützte Adresse', //Shielded address
activityReceivedShield: 'Erhalten von geschützter Adresse', //Received from Shielded address
activityReceivedFrom: 'Erhalten von {s}', //Received from {s}
activityReceivedWith: '', //Received with {s}
activityDelegatedTo: 'Delegiert an {r}', //Delegated to {r}
activityUndelegated: 'Abberufen', //Undelegated
activityUnknown: 'Unbekannte Trasaktion', //Unknown Tx
Expand Down
6 changes: 5 additions & 1 deletion locale/en/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export default {
secureYourWallet: 'Secure your wallet', //
unlockWallet: 'Unlock wallet', //
lockWallet: 'Lock wallet', //
syncStatusHistoryProgress: 'Syncing History Chunks {current} of {total}', //
syncStatusStarting:
"<b>Your wallet is syncing!</b><br>You'll be able to use it fully once this is complete.", //
syncStatusFinished: '<b>Sync Finished!</b><br>Your wallet is ready to use!', //

// Encrypt wallet
encryptWallet: 'Encrypt wallet', //
Expand Down Expand Up @@ -228,7 +232,7 @@ export default {
activitySentTo: 'Sent to {r}',
activitySelf: 'self',
activityShieldedAddress: 'Shielded address',
activityReceivedFrom: 'Received from {s}',
activityReceivedWith: 'Received with {s}',
activityDelegatedTo: 'Delegated to {r}',
activityUndelegated: 'Undelegated',
activityUnknown: 'Unknown Tx',
Expand Down
5 changes: 4 additions & 1 deletion locale/es-mx/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ export default {
secureYourWallet: 'Asegura tu wallet', //Secure your wallet
unlockWallet: 'Desbloquear wallet', //Unlock wallet
lockWallet: 'Bloquear wallet', //Lock wallet
syncStatusHistoryProgress: '', //Syncing History Chunks {current} of {total}
syncStatusStarting: '', //<b>Your wallet is syncing!</b><br>You\'ll be able to use it fully once this is complete.
syncStatusFinished: '', //<b>Sync Finished!</b><br>Your wallet is ready to use!

// Encrypt wallet
encryptWallet: 'Encriptar wallet', //Encrypt wallet
Expand Down Expand Up @@ -236,7 +239,7 @@ export default {
activitySentTo: 'Enviar a {r}', //Sent to
activitySelf: 'ti mismo', //Self
activityShieldedAddress: 'Dirección Shielded', //Shielded address
activityReceivedFrom: 'Recibido de {s}', //Received from
activityReceivedWith: '', //Received with {s}
activityDelegatedTo: 'Delegado a {r}', //Delegated to
activityUndelegated: 'No delegado', //Undelegated
activityUnknown: 'Tx desconocido', //Unknown Tx
Expand Down
5 changes: 4 additions & 1 deletion locale/fr/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ export default {
secureYourWallet: 'Protégez votre portefeuille', //Secure your wallet
unlockWallet: 'Déverrouiller le portefeuille', //Unlock wallet
lockWallet: 'Fermeture du portefeuille', //Lock wallet
syncStatusHistoryProgress: '', //Syncing History Chunks {current} of {total}
syncStatusStarting: '', //<b>Your wallet is syncing!</b><br>You\'ll be able to use it fully once this is complete.
syncStatusFinished: '', //<b>Sync Finished!</b><br>Your wallet is ready to use!

// Encrypt wallet
encryptWallet: 'Cryptage du portefeuille', //Encrypt wallet
Expand Down Expand Up @@ -236,7 +239,7 @@ export default {
activitySentTo: 'Envoyé à {r}', //Sent to
activitySelf: 'soi-même', //Self
activityShieldedAddress: 'Adresse protégée', //Shielded address
activityReceivedFrom: 'Reçu de {s}', //Received from
activityReceivedWith: '', //Received with {s}
activityDelegatedTo: 'Délégué à {r}', //Delegated to
activityUndelegated: 'Non délégué', //Undelegated
activityUnknown: 'Transaction inconnu', //Unknown Tx
Expand Down
5 changes: 4 additions & 1 deletion locale/it/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ export default {
secureYourWallet: 'Proteggi il tuo wallet', //Secure your wallet
unlockWallet: 'Sblocca il wallet', //Unlock wallet
lockWallet: 'Blocca wallet', //Lock wallet
syncStatusHistoryProgress: '', //Syncing History Chunks {current} of {total}
syncStatusStarting: '', //<b>Your wallet is syncing!</b><br>You\'ll be able to use it fully once this is complete.
syncStatusFinished: '', //<b>Sync Finished!</b><br>Your wallet is ready to use!

// Encrypt wallet
encryptWallet: 'Cripta il wallet', //Encrypt wallet
Expand Down Expand Up @@ -218,7 +221,7 @@ export default {
activitySentTo: 'Inviato a {r}', //Sent to
activitySelf: 'te stesso', //Self
activityShieldedAddress: 'Indirizzo protetto', //Shielded address
activityReceivedFrom: 'Ricevuto da {s}', //Received from
activityReceivedWith: '', //Received with {s}
activityDelegatedTo: 'Delegato a {r}', //Delegated to
activityUndelegated: 'Non delegato', //Undelegated
activityUnknown: 'Tx sconosciuta', //Unknown Tx
Expand Down
5 changes: 4 additions & 1 deletion locale/nl/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ export default {
secureYourWallet: 'Beveilig uw portemonnee', //
unlockWallet: 'Ontgrendel portemonnee', //
lockWallet: 'Vergrendel portemonnee', //
syncStatusHistoryProgress: '', //Syncing History Chunks {current} of {total}
syncStatusStarting: '', //<b>Your wallet is syncing!</b><br>You\'ll be able to use it fully once this is complete.
syncStatusFinished: '', //<b>Sync Finished!</b><br>Your wallet is ready to use!

// Encrypt wallet
encryptWallet: 'Versleutel portemonnee', //
Expand Down Expand Up @@ -235,7 +238,7 @@ export default {
activitySentTo: 'Verzonden naar {r}',
activitySelf: 'zelf',
activityShieldedAddress: 'Afgeschermd adres',
activityReceivedFrom: 'Ontvangen van {s}',
activityReceivedWith: '', //Received with {s}
activityDelegatedTo: 'Gedelegeerd aan {r}',
activityUndelegated: 'Gedelegeerd ongedaan gemaakt',
activityUnknown: 'Onbekende transactie',
Expand Down
5 changes: 4 additions & 1 deletion locale/ph/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ export default {
secureYourWallet: 'I-secure ang iyong wallet', //Secure your wallet
unlockWallet: 'Buksan ang Wallet', //Unlock wallet
lockWallet: 'Isara ang wallet', //Lock wallet
syncStatusHistoryProgress: '', //Syncing History Chunks {current} of {total}
syncStatusStarting: '', //<b>Your wallet is syncing!</b><br>You\'ll be able to use it fully once this is complete.
syncStatusFinished: '', //<b>Sync Finished!</b><br>Your wallet is ready to use!

// Encrypt wallet
encryptWallet: 'Encrypt wallet', //Encrypt wallet
Expand Down Expand Up @@ -239,7 +242,7 @@ export default {
activitySentTo: 'Naipadala sa {r}', //Sent to
activitySelf: 'sarili', //Self
activityShieldedAddress: 'Shielded address', //Shielded address
activityReceivedFrom: 'Natanggap mula sa {s}', //Received from
activityReceivedWith: '', //Received with {s}
activityDelegatedTo: 'Delegated to {r}', //Delegated to
activityUndelegated: 'Undeligated', //Undelegated
activityUnknown: 'Unknown Tx', //Unknown Tx
Expand Down
5 changes: 4 additions & 1 deletion locale/pt-br/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ export default {
secureYourWallet: 'Proteja a sua carteira', //Secure your wallet
unlockWallet: 'Desbloquear a carteira', //Unlock wallet
lockWallet: 'Bloquear a carteira', //Lock wallet
syncStatusHistoryProgress: '', //Syncing History Chunks {current} of {total}
syncStatusStarting: '', //<b>Your wallet is syncing!</b><br>You\'ll be able to use it fully once this is complete.
syncStatusFinished: '', //<b>Sync Finished!</b><br>Your wallet is ready to use!

// Encrypt wallet
encryptWallet: 'Criptografar carteira', //Encrypt wallet
Expand Down Expand Up @@ -236,7 +239,7 @@ export default {
activitySentTo: 'Enviado para {r}', //Sent to
activitySelf: 'si mesmo', //Self
activityShieldedAddress: 'Endereço Protegido', //Shielded address
activityReceivedFrom: 'Recebido de {s}', //Received from
activityReceivedWith: '', //Received with {s}
activityDelegatedTo: 'Delegado a {r}', //Delegated to
activityUndelegated: 'Não é Delegado', //Undelegated
activityUnknown: 'Tx desconhecido', //Unknown Tx
Expand Down
5 changes: 4 additions & 1 deletion locale/pt-pt/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ export default {
secureYourWallet: 'Proteja a sua carteira', //Secure your wallet
unlockWallet: 'Desbloquear a carteira', //Unlock wallet
lockWallet: 'Fechar a carteira', //Lock wallet
syncStatusHistoryProgress: '', //Syncing History Chunks {current} of {total}
syncStatusStarting: '', //<b>Your wallet is syncing!</b><br>You\'ll be able to use it fully once this is complete.
syncStatusFinished: '', //<b>Sync Finished!</b><br>Your wallet is ready to use!

// Encrypt wallet
encryptWallet: 'Criptografar carteira', //Encrypt wallet
Expand Down Expand Up @@ -236,7 +239,7 @@ export default {
activitySentTo: 'Enviado para {r}', //Sent to
activitySelf: 'si mesmo', //Self
activityShieldedAddress: 'Endereço Protegido', //Shielded address
activityReceivedFrom: 'Recebido de {s}', //Received from
activityReceivedWith: '', //Received with {s}
activityDelegatedTo: 'Delegado a {r}', //Delegated to
activityUndelegated: 'Não é Delegado', //Undelegated
activityUnknown: 'Tx desconhecido', //Unknown Tx
Expand Down
5 changes: 4 additions & 1 deletion locale/template/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ export default {
secureYourWallet: '', //Secure your wallet
unlockWallet: '', //Unlock wallet
lockWallet: '', //Lock wallet
syncStatusHistoryProgress: '', //Syncing History Chunks {current} of {total}
syncStatusStarting: '', //<b>Your wallet is syncing!</b><br>You\'ll be able to use it fully once this is complete.
syncStatusFinished: '', //<b>Sync Finished!</b><br>Your wallet is ready to use!

// Encrypt wallet
encryptWallet: '', //Encrypt wallet
Expand Down Expand Up @@ -229,7 +232,7 @@ export default {
activitySentTo: '', //Sent to {}
activitySelf: '', // self
activityShieldedAddress: '', //Shielded address
activityReceivedFrom: '', //Received from {}
activityReceivedWith: '', //Received with {s}
activityDelegatedTo: '', // Delegated to {}
activityUndelegated: '', //Undelegated
activityUnknown: '', //Unknown Tx
Expand Down
6 changes: 5 additions & 1 deletion locale/uwu/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ export default {
export: 'Expwort', //Export
refreshAddress: 'Refwesh address', //Refresh address
redeemOrCreateCode: 'Redeem or Cweate Cowode', //Redeem or Create Code
syncStatusHistoryProgress: 'Syncing Hwistory Chwunks {current} of {total}', //Syncing History Chunks {current} of {total}
syncStatusStarting:
'<b>Ur wawwet is syncing!</b><br>u can use it fully once dis iz complete.', //<b>Your wallet is syncing!</b><br>You\'ll be able to use it fully once this is complete.
syncStatusFinished: '<b>Sync Fwinished!</b><br>Ur wawwet is weady to use!', //<b>Sync Finished!</b><br>Your wallet is ready to use!

// Send
address: 'Addwess', //Address
Expand Down Expand Up @@ -232,7 +236,7 @@ export default {
activitySentTo: 'Sentu to {r}', //Sent to
activitySelf: 'selfu', //Self
activityReceivedShield: 'Shielded addwess', //Received from Shielded address
activityReceivedFrom: 'Recewived fwom {s}', //Received from
activityReceivedWith: '', //Received with {s}
activityDelegatedTo: 'Delegwated to {r}', //Delegated to
activityUndelegated: 'Undelegwated', //Undelegated
activityUnknown: 'Unknown Tx', //Unknown Tx
Expand Down
Loading

0 comments on commit fb38a47

Please sign in to comment.