Compare commits
52 Commits
Author | SHA1 | Date |
---|---|---|
poka | 5feb3b6b22 | |
pokapow | 24aee6a53c | |
poka | 853ad0eb6a | |
poka | 25c0144098 | |
pokapow | 1903b988de | |
poka | 8b3ecae62f | |
poka | 1ea3be788e | |
poka | ae36f7384e | |
pokapow | 44c8cfb9bc | |
poka | b924d644b7 | |
poka | 2ae32982f8 | |
poka | 9ed76b071e | |
pokapow | 92fd504505 | |
poka | d749c9a997 | |
poka | 4158a5308c | |
poka | b4e0f110a3 | |
poka | e602099cc3 | |
poka | bc75ae114f | |
poka | 9e91408220 | |
pokapow | 42801f8145 | |
poka | 806a96d127 | |
pokapow | 5b89f661ed | |
poka | 397d795e8b | |
poka | 4c7326bfaa | |
poka | 826dcf7c7c | |
poka | f19a441af3 | |
poka | 7e98a1d063 | |
poka | 68fe7925ac | |
pokapow | bafd853884 | |
poka | 6b1df55ede | |
poka | 0241efc223 | |
poka | 7a93ff4d78 | |
poka | 9a9bc6788c | |
poka | 413c3c708e | |
poka | cf6571e9da | |
poka | da0e9ba2df | |
poka | 80416f5753 | |
poka | 96854fddb9 | |
Kapis | 6c34dd2425 | |
Kapis | e65915a333 | |
Kapis | b48be00149 | |
Millicent Billette | 1481352f6c | |
pokapow | bae16d3a5f | |
poka | b7311970e2 | |
poka | 965ce0f977 | |
poka | 3a5674ae41 | |
pokapow | 38c8b9a995 | |
poka | 8169e1e840 | |
pokapow | e88cf3b2f7 | |
Scan le Gentil | cc36e2652d | |
poka | 6ea827faf9 | |
poka | 44993557c6 |
|
@ -60,4 +60,5 @@ integration_test/duniter/data/chains/
|
||||||
|
|
||||||
# Ignore PC deps
|
# Ignore PC deps
|
||||||
macos/
|
macos/
|
||||||
windows/
|
windows/
|
||||||
|
scripts/pushGecko
|
|
@ -7,7 +7,7 @@ stages:
|
||||||
.env:
|
.env:
|
||||||
image: axiomteam/gecko-ci:v0.0.11
|
image: axiomteam/gecko-ci:v0.0.11
|
||||||
tags:
|
tags:
|
||||||
- redshift
|
- docker
|
||||||
|
|
||||||
format:
|
format:
|
||||||
extends: .env
|
extends: .env
|
||||||
|
@ -28,8 +28,6 @@ build_and_test:
|
||||||
- if: $CI_COMMIT_TAG || $CI_MERGE_REQUEST_ID
|
- if: $CI_COMMIT_TAG || $CI_MERGE_REQUEST_ID
|
||||||
- when: manual
|
- when: manual
|
||||||
stage: build_and_test
|
stage: build_and_test
|
||||||
tags:
|
|
||||||
- redshift
|
|
||||||
script:
|
script:
|
||||||
- flutter analyze
|
- flutter analyze
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 246 KiB |
Binary file not shown.
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 192 KiB |
|
@ -71,7 +71,8 @@
|
||||||
"areYouSureToDeleteWallet": "Are you sure you want to delete the chest \"{}\"?",
|
"areYouSureToDeleteWallet": "Are you sure you want to delete the chest \"{}\"?",
|
||||||
"areYouSureForgetAllChests": "Are you sure you want to forget all your chests?",
|
"areYouSureForgetAllChests": "Are you sure you want to forget all your chests?",
|
||||||
"areYouSureToForgetWallet": "Are you sure you wan to forget the wallet \"{}\"?",
|
"areYouSureToForgetWallet": "Are you sure you wan to forget the wallet \"{}\"?",
|
||||||
"areYouSureYouWantToCertify": "Are you sure you want to certify the address:\n\n{}",
|
"areYouSureYouWantToCertify1": "Are you sure you want to certify the identity :",
|
||||||
|
"areYouSureYouWantToCertify2": "having the address :",
|
||||||
"yes": "Yes",
|
"yes": "Yes",
|
||||||
"no": "No",
|
"no": "No",
|
||||||
"keepYourMnemonicSecret": "Try to keep this phrase a secret, as it allows anyone who knows it to access all your wallets.",
|
"keepYourMnemonicSecret": "Try to keep this phrase a secret, as it allows anyone who knows it to access all your wallets.",
|
||||||
|
@ -156,7 +157,7 @@
|
||||||
"hours": "{} hours {}",
|
"hours": "{} hours {}",
|
||||||
"days": "{} days",
|
"days": "{} days",
|
||||||
"months": "{} months",
|
"months": "{} months",
|
||||||
"certify": "Certify",
|
"certify": "Certify this\nidentity",
|
||||||
"from": "From:",
|
"from": "From:",
|
||||||
"to": "To:",
|
"to": "To:",
|
||||||
"amount": "Amount:",
|
"amount": "Amount:",
|
||||||
|
@ -168,7 +169,7 @@
|
||||||
"deleteThisWallet": "Delete this wallet",
|
"deleteThisWallet": "Delete this wallet",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"inBlockchainResult": "In {} blockchain",
|
"inBlockchainResult": "In {} blockchain",
|
||||||
"search": "Search",
|
"search": "Search an identity\nor an address",
|
||||||
"currencyNode": "{} node :",
|
"currencyNode": "{} node :",
|
||||||
"contactsManagementWithNbr": "My contacts ({})",
|
"contactsManagementWithNbr": "My contacts ({})",
|
||||||
"contactsManagement": "My contacts",
|
"contactsManagement": "My contacts",
|
||||||
|
@ -195,5 +196,11 @@
|
||||||
"youCannotRevokeThisIdentity": "You cannot revoke this identity while\nit is member of the blacksmiths web",
|
"youCannotRevokeThisIdentity": "You cannot revoke this identity while\nit is member of the blacksmiths web",
|
||||||
"showUdAmounts": "Show amounts in UD",
|
"showUdAmounts": "Show amounts in UD",
|
||||||
"ud": "{}UD",
|
"ud": "{}UD",
|
||||||
"chooseATargetWallet": "Choose a target wallet"
|
"chooseATargetWallet": "Choose a target wallet",
|
||||||
|
"thisMnemonicHasBeenCopiedToClipboard": "This mnemonic has been copied to clipboard",
|
||||||
|
"smithCantMigrateIdentity":"You can't migrate this identity while you're member of smith web",
|
||||||
|
"received": "Received",
|
||||||
|
"sent": "Sent",
|
||||||
|
"createIdentity": "Create a new \nidentity",
|
||||||
|
"memberAccountOf": "Account of {}"
|
||||||
}
|
}
|
|
@ -1,90 +1,92 @@
|
||||||
{
|
{
|
||||||
"searchWallet": "Buscar\nbilletera",
|
"searchWallet": "Buscar\nmonedero",
|
||||||
"manageWallets": "Gestionar\nbilleteras",
|
"manageWallets": "Gestionar\nmonederos",
|
||||||
"scanQRCode": "Escanear un\ncódigo QR",
|
"scanQRCode": "Escanear un\ncódigo QR",
|
||||||
"wellConnectedToNode": "Estas bien conectada al nodo\n{}",
|
"wellConnectedToNode": "Estás bien conectado al nodo\n{}",
|
||||||
"networkLost": "Se ha perdido la red...",
|
"networkLost": "Se ha perdido la red...",
|
||||||
"noDuniterEndointAvailable": "No hay servidor disponible...",
|
"noDuniterEndointAvailable": "No hay servidor disponible...",
|
||||||
"connectionPending": "Conexión pendiente...",
|
"connectionPending": "Conexión pendiente...",
|
||||||
"noLizard": "no hay lagarto ;-)",
|
"noLizard": "no hay lagarto ;-)",
|
||||||
"loading": "Cargando...",
|
"loading": "Cargando...",
|
||||||
"forgot_password.png": "forgot_password_en.png",
|
"forgot_password.png": "forgot_password_es.png",
|
||||||
"warningForgotPassword": "In a blockchain, there is no email recovery procedure. Only your recovery phrase can allow you to recover your Ğ1 at any time.",
|
"warningForgotPassword": "En una cadena de bloques o blockchain, no hay procedimiento de recuperación mediante correo electrónico. Sólo tu frase de recuperación puede permitirte recuperar tus Ğ1 en cualquier momento.",
|
||||||
"fastAppDescription": "La aplicación de pago {}\nmás rápida que un reptil de Vietnam",
|
"fastAppDescription": "La aplicación de pago {}\nmás rápida que un reptil de Vietnam",
|
||||||
"createWallet": "Crear una billetera",
|
"createWallet": "Crear un monedero",
|
||||||
"restoreWallet": "Restaurar mis billeteras",
|
"restoreWallet": "Restaurar mis monederos",
|
||||||
"parameters": "Parámetros",
|
"parameters": "Parámetros",
|
||||||
"chooseAnotherMnemonic": "Choose an other\nmnemonic sentence",
|
"chooseAnotherMnemonic": "Elige otra frase de restauración",
|
||||||
"iNotedMyMnemonic": "He escrito mi frase",
|
"iNotedMyMnemonic": "He anotado mi frase de restauración",
|
||||||
"printMyMnemonic": "Print my mnemonic sentence",
|
"printMyMnemonic": "Imprimir mi frase de restauración",
|
||||||
"manageChest": "Configure this chest",
|
"manageChest": "Configurar este cofre",
|
||||||
"changeChest": "Change chest",
|
"changeChest": "Cambiar de cofre",
|
||||||
"geckoChest": "Ğecko chest",
|
"GeckoChest": "Cofre de Ğecko",
|
||||||
"toUnlockEnterPassword": "To unlock your safe, enter your secret code, away from prying lizards:",
|
"toUnlockEnterPassword": "Para desbloquear tu cofre, introduce tu contraseña, lejos de lagartijas curiosas:",
|
||||||
"rememberPassword": "Keep this code in memory for 15 minutes",
|
"rememberPassword": "Mantener en memoria mi contraseña durante 15 minutos",
|
||||||
"myRootWallet": "Mi billetera principal",
|
"myRootWallet": "Mi monedero principal",
|
||||||
"currentWallet": "My current chest",
|
"currentWallet": "Mi cofre actual",
|
||||||
"wallet": "Billetera",
|
"wallet": "monedero",
|
||||||
"displayMnemonic": "Display my mnemonic sentence",
|
"displayMnemonic": "Mostrar mi frase de restauración",
|
||||||
"changePassword": "Cambiar mi contraseña",
|
"changePassword": "Cambiar mi contraseña",
|
||||||
"createDerivation": "Create a new derivation",
|
"createDerivation": "Crear una nueva derivación",
|
||||||
"createCustomDerivation": "Create a new custom derivation",
|
"createCustomDerivation": "Crear una nueva derivación personalizada",
|
||||||
"deleteChest": "Delete this chest",
|
"deleteChest": "Borrar este cofre",
|
||||||
"openThisChest": "Open this chest",
|
"openThisChest": "Abrir este cofre",
|
||||||
"createChest": "Create a new chest",
|
"createChest": "Crear un nuevo cofre",
|
||||||
"importChest": "Import a chest",
|
"importChest": "Importar un cofre",
|
||||||
"selectMyChest": "Select my chest",
|
"selectMyChest": "Seleccionar mi cofre",
|
||||||
"accessMyChest": "Access my chest",
|
"accessMyChest": "Acceder a mi cofre",
|
||||||
"manageMembership": "Manage my membership",
|
"manageMembership": "Administrar mi afiliación",
|
||||||
"chooseThisWallet": "Elegir esta billetera",
|
"chooseThisWallet": "Elegir este monedero",
|
||||||
"thisWalletIsDefault": "This wallet is the default one",
|
"thisWalletIsDefault": "Monedero definido por defecto",
|
||||||
"defineWalletAsDefault": "Define this as the default one",
|
"defineWalletAsDefault": "Definir este monedero como por defecto",
|
||||||
"displayActivity": "Display activity",
|
"displayActivity": "Visualizar actividad",
|
||||||
"displayNActivity": "Display\nactivity",
|
"displayNActivity": "Visualizar\nactividad",
|
||||||
"memberValidated": "Miembro validado!",
|
"memberValidated": "Miembro validado!",
|
||||||
"copyAddress": "Copiar\ndirección",
|
"copyAddress": "Copiar\nla dirección",
|
||||||
"copy": "Copiar",
|
"copy": "Copiar",
|
||||||
"thisAddressHasBeenCopiedToClipboard": "Esta dirección se ha copiado al cortapapeles",
|
"thisAddressHasBeenCopiedToClipboard": "Esta dirección se ha copiado al portapapeles",
|
||||||
"chooseWalletName": "Choose a new name\nfor your wallet:",
|
"chooseWalletName": "Elige un nuevo nombre\npara tu monedero:",
|
||||||
"choosePassword": "Choose a random password:",
|
"choosePassword": "Elige una contraseña aleatoria:",
|
||||||
"chooseDerivation": "Choose a derivation:",
|
"chooseDerivation": "Elige una derivación:",
|
||||||
"validate": "Validar",
|
"validate": "Validar",
|
||||||
"confirm": "Confirmar",
|
"confirm": "Confirmar",
|
||||||
"confirmPayment": "Confirmar pago",
|
"confirmPayment": "Confirmar pago",
|
||||||
"geckoGenerateYourWalletFromMnemonic": "Ğecko builds your wallet from a **restoration sentence**. It is a bit like the blueprint that builds your wallet.",
|
"GeckoGenerateYourWalletFromMnemonic": "Ğecko construye tu monedero a partir de una **frase de restauración**. Es como unos planos que permiten restaurar tu monedero.",
|
||||||
"keepThisMnemonicSecure": "Keep this sentence carefully, because without it Ğecko will not be able to rebuild your wallets the day you change your phone.",
|
"keepThisMnemonicSecure": "Guarda esta frase con cuidado, porque sin ella Ğecko no podrá restaurar tus monederos el día que cambies de dispositivo.",
|
||||||
"geckoGeneratedYourMnemonicKeepItSecret": "Ğecko generated your mnemonic successfully! Keep it secret, because anyone who knows it can access all your wallets.",
|
"GeckoGeneratedYourMnemonicKeepItSecret": "¡Ğecko generó tu frase de restauración con éxito! Mantenla en secreto, porque cualquiera que la sepa puede acceder a todos tus monederos.",
|
||||||
"newWallet": "New Wallet",
|
"newWallet": "Nuevo monedero",
|
||||||
"itsTimeToUseAPenAndPaper": "It's time to take a **pen and paper** in order to write down your mnemonic.",
|
"itsTimeToUseAPenAndPaper": "Es el momento de coger un **papel y un bolígrafo** para anotar tu frase de restauración.",
|
||||||
"yourMnemonic": "Your mnemonic",
|
"yourMnemonic": "tu frase de restauración",
|
||||||
"gecko_also_can_forget.png": "gecko_also_can_forget_en.png",
|
"gecko_also_can_forget.png": "gecko_also_can_forget_es.png",
|
||||||
"didYouNoteMnemonicToBeSureTypeWord": "Did you write down your menmonic?\n\n To be sure, please type the **{}th word** of your restoration phrase in the field below:",
|
"didYouNoteMnemonicToBeSureTypeWord": "¿Anotaste bien tu frase de restauración? Para asegurarnos, escriba la **palabra #{}** de tu frase de restauración en el cuadro de abajo:",
|
||||||
"geckoWillGenerateAPassword": "Gecko will now generate for you a short password that will allow you to quickly access your wallets, without having to type your recovery sentence every time.",
|
"GeckoWillGenerateAPassword": "Ahora Ğecko te generará una contraseña corta que te permitirá acceder rápidamente a tus monederos, sin tener que escribir cada vez tu frase de recuperación.",
|
||||||
"myPassword": "My password",
|
"myPassword": "Mi contraseña",
|
||||||
"thisPasswordProtectsYourWalletsInASecureChest": "This secret code protects your wallets in a safe **which only you have the code for**, so that your wallets cannot be used by others.",
|
"thisPasswordProtectsYourWalletsInASecureChest": "Esta contraseña protege tus monederos en un cofre **del que sólo tú tienes acceso**, para que tus monederos no puedan ser utilizados por otros.",
|
||||||
"hereIsThePasswordKeepIt": "And here is your password!\n\nMemorize it or write it down, because you will be asked **every time** you want to make a payment on this device.",
|
"hereIsThePasswordKeepIt": "¡Y aquí está tu contraseña!\n\nMemorízala o anótala, porque Ğecko te la pedirá **cada vez** que quieras hacer un pago en este dispositivo.",
|
||||||
"chooseAnotherPassword": "Elige otra contraseña",
|
"chooseAnotherPassword": "Elige otra contraseña",
|
||||||
"iNotedMyPassword": "I noted my password",
|
"iNotedMyPassword": "He anotado mi contraseña",
|
||||||
"geckoWillCheckPassword": "Gecko will check with you if you have remembered your secret code.\n\n Type your secret code in the field below to check that you have written it down correctly.",
|
"GeckoWillCheckPassword": "Ğecko comprobará contigo si has recordado tu contraseña. Escribe tu contraseña en el cuadro de abajo para comprobar que lo has apuntado correctamente.",
|
||||||
"yourChestAndWalletWereCreatedSuccessfully": "Super!\n\nYour chest and your first portfolio have been created with great success.\n\nCongratulations!",
|
"yourChestAndWalletWereCreatedSuccessfully": "¡Genial!\n\nTu cofre y tu primer monedero han sido creados con éxito.\n\n¡Felicidades!",
|
||||||
"allGood": "That's all good!",
|
"allGood": "¡Todo bien!",
|
||||||
"areYouSureToDeleteWallet": "Are you sure you want to delete the chest \"{}\"?",
|
"areYouSureToDeleteWallet": "¿Seguro de que quieres eliminar el cofre \"{}\"?",
|
||||||
"areYouSureForgetAllChests": "Are you sure you want to forget all your chests?",
|
"areYouSureForgetAllChests": "¿Seguro de que quieres olvidar todos tus cofres?",
|
||||||
"areYouSureToForgetWallet": "Are you sure you wan to forget the wallet \"{}\"?",
|
"areYouSureToForgetWallet": "¿Seguro de que quieres olvidar el monedero \"{}\"?",
|
||||||
"areYouSureYouWantToCertify": "Are you sure you want to certify the address:\n\n{}",
|
"areYouSureYouWantToCertify": "¿Seguro de que quiere certificar a la dirección\n\n{}?",
|
||||||
"yes": "Si",
|
"areYouSureYouWantToCertify1": "¿Seguro de que quiere certificar a la identidad :",
|
||||||
|
"areYouSureYouWantToCertify2": " a la dirección :",
|
||||||
|
"yes": "Sí",
|
||||||
"no": "No",
|
"no": "No",
|
||||||
"keepYourMnemonicSecret": "Try to keep this phrase a secret, as it allows anyone who knows it to access all your wallets.",
|
"keepYourMnemonicSecret": "Intenta mantener esta frase de restauración en secreto, ya que permite a cualquiera que la conozca acceder a todas tus monederos.",
|
||||||
"iGeneratedYourMnemonicKeepItSecret": "I've generated your restoration phrase!\n Try to keep it a secret, as it allows anyone who knows it to access all your portfolios.",
|
"iGeneratedYourMnemonicKeepItSecret": "¡He generado tu frase de restauración!\nIntenta mantenerla en secreto, ya que permite a cualquiera que la conozca acceder a todos tus monederos.",
|
||||||
"myMnemonic": "My mnemonic",
|
"myMnemonic": "Mi frase de restauración",
|
||||||
"close": "Close",
|
"close": "Cerrar",
|
||||||
"toRestoreEnterMnemonic": "To restore your Gecko wallets, enter in the fields below the 12 words that constitute your restoration phrase:",
|
"toRestoreEnterMnemonic": "Para restaurar tus monederos Ğecko, introduce las 12 palabras que componen tu frase de restauración en los cuadros de abajo:",
|
||||||
"pasteFromClipboard": "Paste from\nclipboard",
|
"pasteFromClipboard": "Pegar del\nportapapeles",
|
||||||
"restoreAChest": "Restore a chest",
|
"restoreAChest": "Restaurar un cofre",
|
||||||
"restoreThisChest": "Restore this chest",
|
"restoreThisChest": "Restaurar este cofre",
|
||||||
"continue": "Continuar",
|
"continue": "Continuar",
|
||||||
"itsTheGoodWord": "It's the good word!",
|
"itsTheGoodWord": "¡Es la palabra correcta!",
|
||||||
"nthMnemonicWord": "word of your mnemonic",
|
"nthMnemonicWord": "palabra de tu mnemotecnia",
|
||||||
"1th": "Primera",
|
"1th": "Primera",
|
||||||
"2th": "Segunda",
|
"2th": "Segunda",
|
||||||
"3th": "Tercera",
|
"3th": "Tercera",
|
||||||
|
@ -98,17 +100,17 @@
|
||||||
"11th": "Undécima",
|
"11th": "Undécima",
|
||||||
"12th": "Duodécima",
|
"12th": "Duodécima",
|
||||||
"yourPasswordLengthIsX": "La longitud de tu contraseña es {}",
|
"yourPasswordLengthIsX": "La longitud de tu contraseña es {}",
|
||||||
"noIdentity": "No identity",
|
"noIdentity": "Ninguna identidad",
|
||||||
"identityCreated": "Identidad creada",
|
"identityCreated": "Identidad creada",
|
||||||
"identityConfirmed": "Identidad confirmada",
|
"identityConfirmed": "Identidad confirmada",
|
||||||
"identityExpired": "Identitdad caducada",
|
"identityExpired": "Identidad caducada",
|
||||||
"confirmYourIdentity": "Confirma tu identidad",
|
"confirmYourIdentity": "Confirma tu identidad",
|
||||||
"noDuniterNodeAvailableTryLater": "No Duniter node available, please try again later",
|
"noDuniterNodeAvailableTryLater": "No hay ningún nodo Duniter disponible, por favor, inténtalo más tarde",
|
||||||
"youAreConnectedToNode": "You are connected to node",
|
"youAreConnectedToNode": "Estás conectado al nodo",
|
||||||
"accountActivity": "Actividad de la cuenta",
|
"accountActivity": "Actividad de la cuenta",
|
||||||
"noNetworkNoHistory": "Network state does not allow\nto display account history",
|
"noNetworkNoHistory": "El estado de la red no permite\nmostrar el historial de la cuenta",
|
||||||
"noDataToDisplay": "No data to be displayed.",
|
"noDataToDisplay": "No hay datos que mostrar.",
|
||||||
"noTransactionToDisplay": "No transaction to display",
|
"noTransactionToDisplay": "No hay transacciónes a mostrar",
|
||||||
"month1": "Enero",
|
"month1": "Enero",
|
||||||
"month2": "Febrero",
|
"month2": "Febrero",
|
||||||
"month3": "Marzo",
|
"month3": "Marzo",
|
||||||
|
@ -124,76 +126,82 @@
|
||||||
"today": "Hoy",
|
"today": "Hoy",
|
||||||
"yesterday": "Ayer",
|
"yesterday": "Ayer",
|
||||||
"thisWeek": "Esta semana",
|
"thisWeek": "Esta semana",
|
||||||
"chestNotCompatibleMustReinstallGecko": "The version of your safes is no longer compatible with this version of Ğecko.\nAll your safes will be forgotten, you must import them again.",
|
"chestNotCompatibleMustReinstallGecko": "La versión de tus cofres no es compatible con esta versión de Ğecko.\nTodos tus cofres serán olvidados, debes importarlos de nuevo.",
|
||||||
"notConnectedToInternet": "No estas conectado a internet",
|
"notConnectedToInternet": "No estás conectado a Internet",
|
||||||
"researchResults": "Results of your research",
|
"researchResults": "Resultados de tu búsqueda",
|
||||||
"resultsFor": "Results for ",
|
"resultsFor": "Resultados para ",
|
||||||
"forgetAllMyChests": "Forget all my chests",
|
"forgetAllMyChests": "Olvida todos mis cofres",
|
||||||
"transaction": "Transaccion",
|
"transaction": "Transacción",
|
||||||
"certification": "Certificacion",
|
"certification": "Certificación",
|
||||||
"identityConfirm": "Identity confirmation",
|
"identityConfirm": "Confirmación de la identidad",
|
||||||
"revokeAdhesion": "Adhesion revocation",
|
"revokeAdhesion": "Revocación de adhesión",
|
||||||
"strangeTransaction": "Strange transaction",
|
"strangeTransaction": "Transacción extraña",
|
||||||
"sending": "Enviando...",
|
"sending": "Enviando...",
|
||||||
"propagating": "Propagando...",
|
"propagating": "Propagando...",
|
||||||
"validating": "Validando...",
|
"validating": "Validando...",
|
||||||
"anErrorOccurred": "Ocurrió un error",
|
"anErrorOccured": "Ocurrió un error",
|
||||||
"24hbetweenCerts": "You have to wait 24h between certs",
|
"24hbetweenCerts": "Hay que esperar 24 horas entre certificaciones",
|
||||||
"canNotCertifySelf": "You can not certify yourself",
|
"canNotCertifySelf": "No puedes certificarte a ti mismo",
|
||||||
"nameAlreadyExist": "This name is already taken",
|
"nameAlreadyExist": "Este nombre ya está ocupado",
|
||||||
"2GDtoKeepAlive": "You have to keep at least 2ĞD to keep your account alive",
|
"2GDtoKeepAlive": "Tienes que mantener al menos 2ĞD para mantener tu cuenta viva",
|
||||||
"youHaveToFeedThisAccountBeforeUsing": "You have to feed this account\nbefore using it.",
|
"youHaveToFeedThisAccountBeforeUsing": "Tienes que nutrir el balance\nde esta cuenta antes de usarla.",
|
||||||
"execTimeoutOver": "Execution timeout is over",
|
"execTimeoutOver": "Se ha agotado el tiempo de ejecución",
|
||||||
"seeAWallet": "Ver una billetera",
|
"seeAWallet": "Ver un monedero",
|
||||||
"mustWaitXBeforeCertify": "Tienes que esperar\n{} antes de\nvolver a certificar",
|
"mustWaitXBeforeCertify": "Tienes que esperar\n{} antes de\nvolver a certificar",
|
||||||
"mustConfirmHisIdentity": "This person must confirm\nhis identity before can be\ncertified",
|
"mustConfirmHisIdentity": "Esta persona debe confirmar\nsu identidad antes de poder ser certificada",
|
||||||
"canRenewCertInX": "You can renew\nthis certification\nin {}",
|
"canRenewCertInX": "Podrás renovar\nla certificación\nen {}",
|
||||||
"executeATransfer": "Execute a transfer",
|
"executeATransfer": "Ejecutar una transacción",
|
||||||
"executeTheTransfer": "Execute the transfer",
|
"executeTheTransfer": "Ejecutar la transacción",
|
||||||
"doATransfer" : "Execute a\ntransfer",
|
"doATransfer" : "Hacer una\ntransacción",
|
||||||
"seconds": "{} segundos",
|
"seconds": "{} segundos",
|
||||||
"minutes": "{} minutos",
|
"minutes": "{} minutos",
|
||||||
"hours": "{} horas {}",
|
"hours": "{} horas {}",
|
||||||
"days": "{} dias",
|
"days": "{} dias",
|
||||||
"months": "{} meses",
|
"months": "{} meses",
|
||||||
"certify": "Certify",
|
"certify": "Certificar esta\nidentidad",
|
||||||
"from": "De:",
|
"from": "De:",
|
||||||
"to": "A:",
|
"to": "A:",
|
||||||
"amount": "Importe:",
|
"amount": "Importe:",
|
||||||
"choiceOfSourceWallet": "Choose a source wallet",
|
"choiceOfSourceWallet": "Elige un monedero de origen",
|
||||||
"extrinsicInProgress": "{} en progreso",
|
"extrinsicInProgress": "{} en progreso",
|
||||||
"extrinsicValidated": "{} validado !",
|
"extrinsicValidated": "¡ {} validado !",
|
||||||
"fromMinus": "de",
|
"fromMinus": "de",
|
||||||
"toMinus": "a",
|
"toMinus": "a",
|
||||||
"deleteThisWallet": "Delete this wallet",
|
"deleteThisWallet": "Borrar este monedero",
|
||||||
"cancel": "Cancelar",
|
"cancel": "Cancelar",
|
||||||
"inBlockchainResult": "In {} blockchain",
|
"inBlockchainResult": "En la blockchain {}",
|
||||||
"search": "Buscar",
|
"search": "Buscar una identidad\no una dirección",
|
||||||
"currencyNode": "{} nodo :",
|
"currencyNode": "Nodo {} :",
|
||||||
"contactsManagementWithNbr": "Mis contactos ({})",
|
"contactsManagementWithNbr": "Mis contactos ({})",
|
||||||
"contactsManagement": "Mis contactos",
|
"contactsManagement": "Mis contactos",
|
||||||
"noContacts": "You don't have any contact",
|
"noContacts": "No tienes ningún contacto",
|
||||||
"addContact": "Add\nto contacts",
|
"addContact": "Añadir\na contactos",
|
||||||
"removeContact": "Remove\nthis contact",
|
"removeContact": "Eliminar\neste contacto",
|
||||||
"derivationsScanProgress": "Scan address {}/{}",
|
"derivationsScanProgress": "Escaneado de la dirección {}/{}",
|
||||||
"youAreOffline": "You are offline...",
|
"youAreOffline": "Estás desconectado...",
|
||||||
"importG1v1": "Import old G1v1 account",
|
"importG1v1": "Importar la cuenta antigua de G1v1",
|
||||||
"selectDestWallet": "Select a target wallet:",
|
"selectDestWallet": "Selecciona un monedero destino:",
|
||||||
"youMustWaitBeforeCashoutThisAccount": "You have to wait a few moment before migrate this account",
|
"youMustWaitBeforeCashoutThisAccount": "Tienes que esperar unos minutos antes de migrar esta cuenta",
|
||||||
"thisAccountIsEmpty": "This account is empty",
|
"thisAccountIsEmpty": "Esta cuenta está vacía",
|
||||||
"youCannotMigrateIdentityToExistingIdentity": "You cannot migrate an identity\nto an account that already has an identity",
|
"youCannotMigrateIdentityToExistingIdentity": "No se puede migrar una identidad\na una cuenta que ya tiene una identidad",
|
||||||
"importOldAccount": "Import your old account",
|
"importOldAccount": "Importar antigua cuenta",
|
||||||
"enterCesiumId": "Ingrese su ID de Cesium",
|
"enterCesiumId": "Ingresa tu frase secreta de Cesium",
|
||||||
"enterCesiumPassword": "Ingrese su contraseña de Cesium",
|
"enterCesiumPassword": "Ingresa tu contraseña de Cesium",
|
||||||
"migrateAccount": "Migrate account",
|
"migrateAccount": "Migrar cuenta",
|
||||||
"migrateIdentity": "Migrate identity",
|
"migrateIdentity": "Migrar identidad",
|
||||||
"identityMigration": "Identity migration",
|
"identityMigration": "Migración de la identidad",
|
||||||
"areYouSureMigrateIdentity": "Are you sure you want to permanently migrate identity **{}** with balance of **{}** ?",
|
"areYouSureMigrateIdentity": "¿Estás seguro de que quieres migrar permanentemente la identidad **{}** con saldo de **{}**?",
|
||||||
"someoneCreatedYourIdentity": "Someone created your {} identity !",
|
"someoneCreatedYourIdentity": "¡ Alguien ha creado tu {} identidad !",
|
||||||
"confirmMyIdentity": "Confirmar mi identidad",
|
"confirmMyIdentity": "Confirmar mi identidad",
|
||||||
"revokeMyIdentity": "Revocar mi identidad",
|
"revokeMyIdentity": "Revocar mi identidad",
|
||||||
"youCannotRevokeThisIdentity": "You cannot revoke this identity while\nit is member of the blacksmiths web",
|
"youCannotRevokeThisIdentity": "No puedes revocar esta identidad mientras\nseas miembro de la red de forjadores",
|
||||||
"showUdAmounts": "Show amounts in UD",
|
"showUdAmounts": "Mostrar importes en DU",
|
||||||
"ud": "{}UD",
|
"ud": "{}DU",
|
||||||
"chooseATargetWallet": "Elija una billetera de destino"
|
"chooseATargetWallet": "Elige un monedero de destino",
|
||||||
|
"thisMnemonicHasBeenCopiedToClipboard": "This mnemonic has been copied to clipboard",
|
||||||
|
"smithCantMigrateIdentity":"You can't migrate this identity while you're member of smith web",
|
||||||
|
"received": "Received",
|
||||||
|
"sent": "Sent",
|
||||||
|
"createIdentity": "Create a new \nidentity",
|
||||||
|
"memberAccountOf": "Account of {}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,8 @@
|
||||||
"areYouSureToDeleteWallet": "Êtes-vous sûr de vouloir supprimer le coffre \"{}\" ?",
|
"areYouSureToDeleteWallet": "Êtes-vous sûr de vouloir supprimer le coffre \"{}\" ?",
|
||||||
"areYouSureForgetAllChests": "Êtes-vous sûr de vouloir oublier tous vos coffres ?",
|
"areYouSureForgetAllChests": "Êtes-vous sûr de vouloir oublier tous vos coffres ?",
|
||||||
"areYouSureToForgetWallet": "Êtes-vous sûr de vouloir oublier le portefeuille \"{}\" ?",
|
"areYouSureToForgetWallet": "Êtes-vous sûr de vouloir oublier le portefeuille \"{}\" ?",
|
||||||
"areYouSureYouWantToCertify": "Êtes-vous certain de vouloir certifier l'adresse:\n\n{}",
|
"areYouSureYouWantToCertify1": "Êtes-vous certain de vouloir certifier l'identité :",
|
||||||
|
"areYouSureYouWantToCertify2": "ayant pour adresse :",
|
||||||
"yes": "Oui",
|
"yes": "Oui",
|
||||||
"no": "Non",
|
"no": "Non",
|
||||||
"keepYourMnemonicSecret": "Tâchez de garder cette phrase bien secrète, car elle permet à quiconque la connaît d’accéder à tous vos portefeuilles.",
|
"keepYourMnemonicSecret": "Tâchez de garder cette phrase bien secrète, car elle permet à quiconque la connaît d’accéder à tous vos portefeuilles.",
|
||||||
|
@ -157,7 +158,7 @@
|
||||||
"hours": "{} heures {}",
|
"hours": "{} heures {}",
|
||||||
"days": "{} jours",
|
"days": "{} jours",
|
||||||
"months": "{} mois",
|
"months": "{} mois",
|
||||||
"certify": "Certifier",
|
"certify": "Certifier cette\nidentité",
|
||||||
"from": "Depuis:",
|
"from": "Depuis:",
|
||||||
"to": "Vers:",
|
"to": "Vers:",
|
||||||
"amount": "Montant:",
|
"amount": "Montant:",
|
||||||
|
@ -169,7 +170,7 @@
|
||||||
"deleteThisWallet": "Supprimer ce portefeuille",
|
"deleteThisWallet": "Supprimer ce portefeuille",
|
||||||
"cancel": "Annuler",
|
"cancel": "Annuler",
|
||||||
"inBlockchainResult": "Dans la blockchain {}",
|
"inBlockchainResult": "Dans la blockchain {}",
|
||||||
"search": "Rechercher",
|
"search": "Rechercher une identité\nou une adresse",
|
||||||
"currencyNode": "Noeud {} :",
|
"currencyNode": "Noeud {} :",
|
||||||
"contactsManagementWithNbr": "Mes contacts ({})",
|
"contactsManagementWithNbr": "Mes contacts ({})",
|
||||||
"contactsManagement": "Mes contacts",
|
"contactsManagement": "Mes contacts",
|
||||||
|
@ -180,7 +181,7 @@
|
||||||
"youAreOffline": "Vous êtes hors ligne...",
|
"youAreOffline": "Vous êtes hors ligne...",
|
||||||
"importG1v1": "Importer un ancien compte G1v1",
|
"importG1v1": "Importer un ancien compte G1v1",
|
||||||
"selectDestWallet": "Sélectionnez un portefeuille cible:",
|
"selectDestWallet": "Sélectionnez un portefeuille cible:",
|
||||||
"youMustWaitBeforeCashoutThisAccount": "Vous devez attendre quelques minutes avant de pouvoir migrer ce compte",
|
"youMustWaitBeforeCashoutThisAccount": "Vous devez attendre quelques minutes\navant de pouvoir migrer ce compte",
|
||||||
"thisAccountIsEmpty": "Ce compte est vide",
|
"thisAccountIsEmpty": "Ce compte est vide",
|
||||||
"youCannotMigrateIdentityToExistingIdentity": "Vous ne pouvez pas migrer une identité\nvers un compte disposant déjà d'une identité",
|
"youCannotMigrateIdentityToExistingIdentity": "Vous ne pouvez pas migrer une identité\nvers un compte disposant déjà d'une identité",
|
||||||
"importOldAccount": "Importer son ancien compte",
|
"importOldAccount": "Importer son ancien compte",
|
||||||
|
@ -196,5 +197,11 @@
|
||||||
"youCannotRevokeThisIdentity": "Vous ne pouvez pas révoquer cette identité tant\nqu'elle fait partie de la toile forgerons",
|
"youCannotRevokeThisIdentity": "Vous ne pouvez pas révoquer cette identité tant\nqu'elle fait partie de la toile forgerons",
|
||||||
"showUdAmounts": "Afficher les montants en DU",
|
"showUdAmounts": "Afficher les montants en DU",
|
||||||
"ud": "{}DU",
|
"ud": "{}DU",
|
||||||
"chooseATargetWallet": "Choisissez un portefeuille cible"
|
"chooseATargetWallet": "Choisissez un portefeuille cible",
|
||||||
}
|
"thisMnemonicHasBeenCopiedToClipboard": "Cette phrase secrète viens d'être copié dans votre presse-papier.",
|
||||||
|
"smithCantMigrateIdentity":"Vous ne pouvez pas migrer cette identité\ntant que vous êtes dans la toile forgerons",
|
||||||
|
"received": "Reçus",
|
||||||
|
"sent": "Envoyés",
|
||||||
|
"createIdentity": "Créer sa nouvelle\nidentité",
|
||||||
|
"memberAccountOf": "Compte de {}"
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
[
|
[
|
||||||
|
"wss://gdev.p2p.legal/ws",
|
||||||
"wss://gdev.librelois.fr/ws"
|
"wss://gdev.librelois.fr/ws"
|
||||||
]
|
]
|
||||||
|
|
|
@ -26,7 +26,7 @@ void main() async {
|
||||||
await tapKey(keyImportG1v1);
|
await tapKey(keyImportG1v1);
|
||||||
await enterText(keyCesiumId, 'test');
|
await enterText(keyCesiumId, 'test');
|
||||||
await enterText(keyCesiumPassword, 'test');
|
await enterText(keyCesiumPassword, 'test');
|
||||||
await waitFor(cesiumTest1.shortAddress());
|
await waitFor('DCovzCEnQm9GUWe6mr8u42JR1JAuoj3HbQUGdCkfTzSr');
|
||||||
await waitFor('100.0');
|
await waitFor('100.0');
|
||||||
await waitFor('3', exactMatch: true);
|
await waitFor('3', exactMatch: true);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
|
@ -135,7 +136,7 @@ Future<void> waitFor(String text,
|
||||||
Finder finder = exactMatch ? find.text(text) : find.textContaining(text);
|
Finder finder = exactMatch ? find.text(text) : find.textContaining(text);
|
||||||
log.d('INTEGRATION TEST: Wait for: $text');
|
log.d('INTEGRATION TEST: Wait for: $text');
|
||||||
|
|
||||||
final String searchType = reverse ? 'reversed text' : 'text';
|
final searchType = reverse ? 'reversed text' : 'text';
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (DateTime.now().isAfter(end)) {
|
if (DateTime.now().isAfter(end)) {
|
||||||
|
|
|
@ -50,3 +50,6 @@ const debugPin = true;
|
||||||
String indexerEndpoint = '';
|
String indexerEndpoint = '';
|
||||||
late double balanceRatio;
|
late double balanceRatio;
|
||||||
late int udValue;
|
late int udValue;
|
||||||
|
|
||||||
|
// Indexer
|
||||||
|
late DateTime startBlockchainTime;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
|
@ -98,31 +99,35 @@ Future<void> main() async {
|
||||||
// // ]);
|
// // ]);
|
||||||
// Catcher(rootWidget: Gecko(endPointGVA, _store), debugConfig: debugOptions);
|
// Catcher(rootWidget: Gecko(endPointGVA, _store), debugConfig: debugOptions);
|
||||||
|
|
||||||
await SentryFlutter.init(
|
await SentryFlutter.init((options) {
|
||||||
(options) {
|
options.dsn =
|
||||||
options.dsn =
|
'https://c09587b46eaa42e8b9fda28d838ed180@o496840.ingest.sentry.io/5572110';
|
||||||
'https://c09587b46eaa42e8b9fda28d838ed180@o496840.ingest.sentry.io/5572110';
|
},
|
||||||
},
|
appRunner: () => SystemChrome.setPreferredOrientations(
|
||||||
appRunner: () => runApp(
|
[DeviceOrientation.portraitUp]).then((_) {
|
||||||
EasyLocalization(
|
runApp(EasyLocalization(
|
||||||
supportedLocales: const [Locale('en'), Locale('fr'), Locale('es')],
|
supportedLocales: const [
|
||||||
path: 'assets/translations',
|
Locale('en'),
|
||||||
fallbackLocale: const Locale('en'),
|
Locale('fr'),
|
||||||
child: const Gecko(),
|
Locale('es')
|
||||||
),
|
],
|
||||||
),
|
path: 'assets/translations',
|
||||||
);
|
fallbackLocale: const Locale('en'),
|
||||||
|
child: const Gecko(),
|
||||||
|
));
|
||||||
|
}));
|
||||||
} else {
|
} else {
|
||||||
log.i('Debug mode enabled: No sentry alerte');
|
log.i('Debug mode enabled: No sentry alerte');
|
||||||
|
|
||||||
runApp(
|
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
|
||||||
EasyLocalization(
|
.then((_) {
|
||||||
|
runApp(EasyLocalization(
|
||||||
supportedLocales: const [Locale('en'), Locale('fr'), Locale('es')],
|
supportedLocales: const [Locale('en'), Locale('fr'), Locale('es')],
|
||||||
path: 'assets/translations',
|
path: 'assets/translations',
|
||||||
fallbackLocale: const Locale('en'),
|
fallbackLocale: const Locale('en'),
|
||||||
child: const Gecko(),
|
child: const Gecko(),
|
||||||
),
|
));
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +136,6 @@ class Gecko extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
|
|
||||||
// To configure multi_endpoints GraphQLProvider: https://stackoverflow.com/q/70656513/8301867
|
// To configure multi_endpoints GraphQLProvider: https://stackoverflow.com/q/70656513/8301867
|
||||||
|
|
||||||
return MultiProvider(
|
return MultiProvider(
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:hive_flutter/hive_flutter.dart';
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
|
||||||
part 'chest_data.g.dart';
|
part 'chest_data.g.dart';
|
||||||
|
|
||||||
@HiveType(typeId: 1)
|
@HiveType(typeId: 1)
|
||||||
|
|
|
@ -56,5 +56,43 @@ query ($address: String!, $number: Int!, $cursor: String) {
|
||||||
}
|
}
|
||||||
''';
|
''';
|
||||||
|
|
||||||
// To parse indexer date format
|
const String getCertsReceived = r'''
|
||||||
// log.d(DateTime.parse("2022-06-13T16:51:24.001+00:00").toString());
|
query ($address: String!) {
|
||||||
|
certification(where: {receiver: {pubkey: {_eq: $address}}}) {
|
||||||
|
issuer {
|
||||||
|
pubkey
|
||||||
|
name
|
||||||
|
}
|
||||||
|
created_at
|
||||||
|
}
|
||||||
|
}
|
||||||
|
''';
|
||||||
|
|
||||||
|
const String getCertsSent = r'''
|
||||||
|
query ($address: String!) {
|
||||||
|
certification(where: {issuer: {pubkey: {_eq: $address}}}) {
|
||||||
|
receiver {
|
||||||
|
pubkey
|
||||||
|
name
|
||||||
|
}
|
||||||
|
created_at
|
||||||
|
}
|
||||||
|
}
|
||||||
|
''';
|
||||||
|
|
||||||
|
const String isIdtyExistQ = r'''
|
||||||
|
query ($name: String!) {
|
||||||
|
identity(where: {name: {_eq: $name}}) {
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
''';
|
||||||
|
|
||||||
|
const String getBlockchainStartQ = r'''
|
||||||
|
query {
|
||||||
|
block(limit: 1) {
|
||||||
|
created_at
|
||||||
|
number
|
||||||
|
}
|
||||||
|
}
|
||||||
|
''';
|
||||||
|
|
|
@ -61,6 +61,9 @@ const keyCloseTransactionScreen = Key('keyCloseTransactionScreen');
|
||||||
const keyListTransactions = Key('keyListTransactions');
|
const keyListTransactions = Key('keyListTransactions');
|
||||||
const keyActivityScreen = Key('keyActivityScreen');
|
const keyActivityScreen = Key('keyActivityScreen');
|
||||||
|
|
||||||
|
// Certification view
|
||||||
|
const keyCertsReceived = Key('keyCertsReceived');
|
||||||
|
|
||||||
// Unlock wallet
|
// Unlock wallet
|
||||||
const keyUnlockWallet = Key('keyUnlockWallet');
|
const keyUnlockWallet = Key('keyUnlockWallet');
|
||||||
const keyPinForm = Key('keyPinForm');
|
const keyPinForm = Key('keyPinForm');
|
||||||
|
|
|
@ -8,8 +8,6 @@ import 'package:path_provider/path_provider.dart';
|
||||||
|
|
||||||
class CesiumPlusProvider with ChangeNotifier {
|
class CesiumPlusProvider with ChangeNotifier {
|
||||||
TextEditingController cesiumName = TextEditingController();
|
TextEditingController cesiumName = TextEditingController();
|
||||||
Image defaultAvatar(double size) =>
|
|
||||||
Image.asset(('assets/icon_user.png'), height: size);
|
|
||||||
|
|
||||||
CancelToken avatarCancelToken = CancelToken();
|
CancelToken avatarCancelToken = CancelToken();
|
||||||
|
|
||||||
|
@ -156,3 +154,6 @@ class CesiumPlusProvider with ChangeNotifier {
|
||||||
return finalAvatar;
|
return finalAvatar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Image defaultAvatar(double size) =>
|
||||||
|
Image.asset(('assets/icon_user.png'), height: size);
|
||||||
|
|
|
@ -16,11 +16,11 @@ class ChestProvider with ChangeNotifier {
|
||||||
|
|
||||||
Future deleteChest(context, ChestData chest) async {
|
Future deleteChest(context, ChestData chest) async {
|
||||||
final bool? answer = await (_confirmDeletingChest(context, chest.name));
|
final bool? answer = await (_confirmDeletingChest(context, chest.name));
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
if (answer ?? false) {
|
if (answer ?? false) {
|
||||||
await sub.deleteAccounts(getChestWallets(chest));
|
await sub.deleteAccounts(getChestWallets(chest));
|
||||||
await chestBox.delete(chest.key);
|
await chestBox.delete(chest.key);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
|
|
||||||
myWalletProvider.pinCode = '';
|
myWalletProvider.pinCode = '';
|
||||||
|
|
|
@ -162,7 +162,7 @@ class DuniterIndexer with ChangeNotifier {
|
||||||
Color color = Colors.black,
|
Color color = Colors.black,
|
||||||
FontWeight fontWeight = FontWeight.w400,
|
FontWeight fontWeight = FontWeight.w400,
|
||||||
FontStyle fontStyle = FontStyle.italic]) {
|
FontStyle fontStyle = FontStyle.italic]) {
|
||||||
WalletOptionsProvider walletOptions =
|
final walletOptions =
|
||||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||||
if (indexerEndpoint == '') {
|
if (indexerEndpoint == '') {
|
||||||
if (wallet == null) {
|
if (wallet == null) {
|
||||||
|
@ -247,10 +247,9 @@ class DuniterIndexer with ChangeNotifier {
|
||||||
Widget searchIdentity(BuildContext context, String name) {
|
Widget searchIdentity(BuildContext context, String name) {
|
||||||
// WalletOptionsProvider _walletOptions =
|
// WalletOptionsProvider _walletOptions =
|
||||||
// Provider.of<WalletOptionsProvider>(context, listen: false);
|
// Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||||
CesiumPlusProvider cesiumPlusProvider =
|
|
||||||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
|
||||||
WalletsProfilesProvider walletsProfiles =
|
WalletsProfilesProvider walletsProfiles =
|
||||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||||
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
if (indexerEndpoint == '') {
|
if (indexerEndpoint == '') {
|
||||||
return const Text('Aucun résultat');
|
return const Text('Aucun résultat');
|
||||||
}
|
}
|
||||||
|
@ -294,6 +293,11 @@ class DuniterIndexer with ChangeNotifier {
|
||||||
return Text('noResult'.tr());
|
return Text('noResult'.tr());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (Map profile in identities) {
|
||||||
|
duniterIndexer.walletNameIndexer
|
||||||
|
.putIfAbsent(profile['pubkey'], () => profile['name']);
|
||||||
|
}
|
||||||
|
|
||||||
double avatarSize = 55;
|
double avatarSize = 55;
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: ListView(children: <Widget>[
|
child: ListView(children: <Widget>[
|
||||||
|
@ -304,7 +308,7 @@ class DuniterIndexer with ChangeNotifier {
|
||||||
key: keySearchResult(profile['pubkey']),
|
key: keySearchResult(profile['pubkey']),
|
||||||
horizontalTitleGap: 40,
|
horizontalTitleGap: 40,
|
||||||
contentPadding: const EdgeInsets.all(5),
|
contentPadding: const EdgeInsets.all(5),
|
||||||
leading: cesiumPlusProvider.defaultAvatar(avatarSize),
|
leading: defaultAvatar(avatarSize),
|
||||||
title: Row(children: <Widget>[
|
title: Row(children: <Widget>[
|
||||||
Text(getShortPubkey(profile['pubkey']),
|
Text(getShortPubkey(profile['pubkey']),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
@ -340,10 +344,7 @@ class DuniterIndexer with ChangeNotifier {
|
||||||
walletsProfiles.address = profile['pubkey'];
|
walletsProfiles.address = profile['pubkey'];
|
||||||
return WalletViewScreen(
|
return WalletViewScreen(
|
||||||
address: profile['pubkey'],
|
address: profile['pubkey'],
|
||||||
username: g1WalletsBox
|
username: name,
|
||||||
.get(profile['pubkey'])
|
|
||||||
?.id
|
|
||||||
?.username,
|
|
||||||
avatar:
|
avatar:
|
||||||
g1WalletsBox.get(profile['pubkey'])?.avatar,
|
g1WalletsBox.get(profile['pubkey'])?.avatar,
|
||||||
);
|
);
|
||||||
|
@ -369,8 +370,8 @@ class DuniterIndexer with ChangeNotifier {
|
||||||
transBC.add(i);
|
transBC.add(i);
|
||||||
transBC[i] = [];
|
transBC[i] = [];
|
||||||
transBC[i].add(DateTime.parse(transaction['created_at']));
|
transBC[i].add(DateTime.parse(transaction['created_at']));
|
||||||
final int amountBrut = transaction['amount'];
|
final amountBrut = transaction['amount'];
|
||||||
final double amount = removeDecimalZero(amountBrut / 100);
|
final amount = removeDecimalZero(amountBrut / 100);
|
||||||
if (direction == "RECEIVED") {
|
if (direction == "RECEIVED") {
|
||||||
transBC[i].add(transaction['issuer_pubkey']);
|
transBC[i].add(transaction['issuer_pubkey']);
|
||||||
transBC[i].add(transaction['issuer']['identity']?['name'] ?? '');
|
transBC[i].add(transaction['issuer']['identity']?['name'] ?? '');
|
||||||
|
@ -447,3 +448,36 @@ class DuniterIndexer with ChangeNotifier {
|
||||||
// checkHistoryResult(
|
// checkHistoryResult(
|
||||||
// QueryResult<Object?> result, FetchMoreOptions options, String address) {}
|
// QueryResult<Object?> result, FetchMoreOptions options, String address) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//// Manuals queries
|
||||||
|
|
||||||
|
Future<bool> isIdtyExist(String name) async {
|
||||||
|
final variables = <String, dynamic>{
|
||||||
|
'name': name,
|
||||||
|
};
|
||||||
|
final result = await _execQuery(isIdtyExistQ, variables);
|
||||||
|
return result.data!['identity']?.isEmpty ?? false ? false : true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<DateTime> getBlockStart() async {
|
||||||
|
final result = await _execQuery(getBlockchainStartQ, {});
|
||||||
|
startBlockchainTime = DateTime.parse(result.data!['block'][0]['created_at']);
|
||||||
|
return startBlockchainTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<QueryResult> _execQuery(
|
||||||
|
String query, Map<String, dynamic> variables) async {
|
||||||
|
final httpLink = HttpLink(
|
||||||
|
'$indexerEndpoint/v1/graphql',
|
||||||
|
);
|
||||||
|
|
||||||
|
final GraphQLClient client = GraphQLClient(
|
||||||
|
cache: GraphQLCache(),
|
||||||
|
link: httpLink,
|
||||||
|
);
|
||||||
|
|
||||||
|
final QueryOptions options =
|
||||||
|
QueryOptions(document: gql(query), variables: variables);
|
||||||
|
|
||||||
|
return await client.query(options);
|
||||||
|
}
|
||||||
|
|
|
@ -249,7 +249,7 @@ class GenerateWalletsProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<String>> generateWordList(BuildContext context) async {
|
Future<List<String>> generateWordList(BuildContext context) async {
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
generatedMnemonic = await sub.generateMnemonic(lang: appLang);
|
generatedMnemonic = await sub.generateMnemonic(lang: appLang);
|
||||||
List<String> wordsList = [];
|
List<String> wordsList = [];
|
||||||
|
@ -369,7 +369,7 @@ class GenerateWalletsProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> scanDerivations(BuildContext context) async {
|
Future<bool> scanDerivations(BuildContext context) async {
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
final currentChestNumber = configBox.get('currentChest');
|
final currentChestNumber = configBox.get('currentChest');
|
||||||
bool isAlive = false;
|
bool isAlive = false;
|
||||||
scanedValidWalletNumber = 0;
|
scanedValidWalletNumber = 0;
|
||||||
|
@ -445,6 +445,8 @@ class GenerateWalletsProvider with ChangeNotifier {
|
||||||
onTimeout: () => {},
|
onTimeout: () => {},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
log.d(balance);
|
||||||
|
|
||||||
log.d(
|
log.d(
|
||||||
"${addressData.address!}: ${balance['transferableBalance']} $currencyName");
|
"${addressData.address!}: ${balance['transferableBalance']} $currencyName");
|
||||||
if (balance['transferableBalance'] != 0) {
|
if (balance['transferableBalance'] != 0) {
|
||||||
|
|
|
@ -8,6 +8,7 @@ import 'dart:math';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
|
@ -133,7 +134,7 @@ class HomeProvider with ChangeNotifier {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
Widget bottomAppBar(BuildContext context) {
|
Widget bottomAppBar(BuildContext context) {
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
WalletsProfilesProvider historyProvider =
|
WalletsProfilesProvider historyProvider =
|
||||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||||
|
|
|
@ -86,8 +86,8 @@ class MyWalletsProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<int> deleteAllWallet(context) async {
|
Future<int> deleteAllWallet(context) async {
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
try {
|
try {
|
||||||
log.w('DELETE ALL WALLETS ?');
|
log.w('DELETE ALL WALLETS ?');
|
||||||
|
@ -124,7 +124,7 @@ class MyWalletsProvider with ChangeNotifier {
|
||||||
|
|
||||||
int? chest = getCurrentChest();
|
int? chest = getCurrentChest();
|
||||||
|
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
WalletData defaultWallet = getDefaultWallet();
|
WalletData defaultWallet = getDefaultWallet();
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ class MyWalletsProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> generateRootWallet(context, String name) async {
|
Future<void> generateRootWallet(context, String name) async {
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
|
|
||||||
isNewDerivationLoading = true;
|
isNewDerivationLoading = true;
|
||||||
|
@ -162,7 +162,7 @@ class MyWalletsProvider with ChangeNotifier {
|
||||||
} else {
|
} else {
|
||||||
newWalletNbr = walletConfig.last.number! + 1;
|
newWalletNbr = walletConfig.last.number! + 1;
|
||||||
}
|
}
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
WalletData defaultWallet = myWalletProvider.getDefaultWallet();
|
WalletData defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
|
|
||||||
|
|
|
@ -68,8 +68,7 @@ class SearchProvider with ChangeNotifier {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
Future<List<G1WalletsList>> searchAddress() async {
|
Future<List<G1WalletsList>> searchAddress() async {
|
||||||
final WalletsProfilesProvider walletProfiles =
|
final walletProfiles = WalletsProfilesProvider('pubkey');
|
||||||
WalletsProfilesProvider('pubkey');
|
|
||||||
|
|
||||||
if (walletProfiles.isAddress(searchController.text)) {
|
if (walletProfiles.isAddress(searchController.text)) {
|
||||||
G1WalletsList wallet = G1WalletsList(address: searchController.text);
|
G1WalletsList wallet = G1WalletsList(address: searchController.text);
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
// ignore_for_file: use_build_context_synchronously
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:fast_base58/fast_base58.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/chest_data.dart';
|
import 'package:gecko/models/chest_data.dart';
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
|
import 'package:gecko/providers/duniter_indexer.dart';
|
||||||
import 'package:gecko/providers/home.dart';
|
import 'package:gecko/providers/home.dart';
|
||||||
import 'package:gecko/providers/my_wallets.dart';
|
import 'package:gecko/providers/my_wallets.dart';
|
||||||
import 'package:gecko/providers/wallet_options.dart';
|
import 'package:gecko/providers/wallet_options.dart';
|
||||||
import 'package:gecko/providers/wallets_profiles.dart';
|
import 'package:gecko/providers/wallets_profiles.dart';
|
||||||
|
import 'package:pinenacl/ed25519.dart';
|
||||||
import 'package:polkawallet_sdk/api/apiKeyring.dart';
|
import 'package:polkawallet_sdk/api/apiKeyring.dart';
|
||||||
import 'package:polkawallet_sdk/api/types/networkParams.dart';
|
import 'package:polkawallet_sdk/api/types/networkParams.dart';
|
||||||
import 'package:polkawallet_sdk/api/types/txInfoData.dart';
|
import 'package:polkawallet_sdk/api/types/txInfoData.dart';
|
||||||
|
@ -39,9 +42,11 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
TextEditingController csSalt = TextEditingController();
|
TextEditingController csSalt = TextEditingController();
|
||||||
TextEditingController csPassword = TextEditingController();
|
TextEditingController csPassword = TextEditingController();
|
||||||
String g1V1NewAddress = '';
|
String g1V1NewAddress = '';
|
||||||
|
String g1V1OldPubkey = '';
|
||||||
bool isCesiumIDVisible = false;
|
bool isCesiumIDVisible = false;
|
||||||
bool isCesiumAddresLoading = false;
|
bool isCesiumAddresLoading = false;
|
||||||
late int udValue;
|
late int udValue;
|
||||||
|
Map<String, List<int>> certsCounterCache = {};
|
||||||
|
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
////////// 1: API METHODS ///////////
|
////////// 1: API METHODS ///////////
|
||||||
|
@ -122,12 +127,20 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
return await _getStorage('identity.identityIndexOf("$address")') ?? 0;
|
return await _getStorage('identity.identityIndexOf("$address")') ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<int>> getCerts(String address) async {
|
Future<List<int>> getCertsCounter(String address) async {
|
||||||
final idtyIndex = await _getIdentityIndexOf(address);
|
final idtyIndex = await _getIdentityIndexOf(address);
|
||||||
final certsReceiver =
|
final certsReceiver =
|
||||||
await _getStorage('cert.storageIdtyCertMeta($idtyIndex)') ?? [];
|
await _getStorage('cert.storageIdtyCertMeta($idtyIndex)') ?? [];
|
||||||
|
|
||||||
return [certsReceiver['receivedCount'], certsReceiver['issuedCount']];
|
if (certsCounterCache[address] == null) {
|
||||||
|
certsCounterCache.putIfAbsent(address, () => []);
|
||||||
|
}
|
||||||
|
certsCounterCache.update(
|
||||||
|
address,
|
||||||
|
(value) =>
|
||||||
|
[certsReceiver['receivedCount'], certsReceiver['issuedCount']]);
|
||||||
|
|
||||||
|
return certsCounterCache[address]!;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<int> getCertValidityPeriod(String from, String to) async {
|
Future<int> getCertValidityPeriod(String from, String to) async {
|
||||||
|
@ -275,6 +288,9 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
result.putIfAbsent('certDelay', () => certDelayDuration);
|
result.putIfAbsent('certDelay', () => certDelayDuration);
|
||||||
} else if (toStatus == 'Created') {
|
} else if (toStatus == 'Created') {
|
||||||
result.putIfAbsent('toStatus', () => 1);
|
result.putIfAbsent('toStatus', () => 1);
|
||||||
|
} else if (toStatus == 'noid') {
|
||||||
|
result.putIfAbsent('toStatus', () => 2);
|
||||||
|
result.putIfAbsent('canCert', () => 0);
|
||||||
} else {
|
} else {
|
||||||
result.putIfAbsent('canCert', () => 0);
|
result.putIfAbsent('canCert', () => 0);
|
||||||
}
|
}
|
||||||
|
@ -295,7 +311,7 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> idtyStatus(String address) async {
|
Future<String> idtyStatus(String address) async {
|
||||||
// WalletOptionsProvider walletOptions =
|
// final walletOptions =
|
||||||
// Provider.of<WalletOptionsProvider>(homeContext, listen: false);
|
// Provider.of<WalletOptionsProvider>(homeContext, listen: false);
|
||||||
|
|
||||||
var idtyIndex = await _getIdentityIndexOf(address);
|
var idtyIndex = await _getIdentityIndexOf(address);
|
||||||
|
@ -319,6 +335,15 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<bool> isSmith(String address) async {
|
||||||
|
var idtyIndex = await _getIdentityIndexOf(address);
|
||||||
|
if (idtyIndex == 0) return false;
|
||||||
|
|
||||||
|
final isSmith =
|
||||||
|
await _getStorage('smithsMembership.membership($idtyIndex)');
|
||||||
|
return isSmith == null ? false : true;
|
||||||
|
}
|
||||||
|
|
||||||
Future<String> getGenesisHash() async {
|
Future<String> getGenesisHash() async {
|
||||||
final String genesisHash = await sdk.webView!.evalJavascript(
|
final String genesisHash = await sdk.webView!.evalJavascript(
|
||||||
'api.genesisHash.toHex()',
|
'api.genesisHash.toHex()',
|
||||||
|
@ -380,6 +405,77 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
return estimateFees.partialFee / 100;
|
return estimateFees.partialFee / 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int hexStringToUint16(String input) {
|
||||||
|
// Slice the string in 2-char substrings and parse it from hex to decimal
|
||||||
|
final bytes = sliceString(input, 2).map((s) => int.parse(s, radix: 16));
|
||||||
|
|
||||||
|
// Create a Uint8 from the 2-bytes list
|
||||||
|
final u8list = Uint8List.fromList(bytes.toList());
|
||||||
|
|
||||||
|
// Return a Uint16 little endian representation
|
||||||
|
return ByteData.view(u8list.buffer).getUint16(0, Endian.little);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> sliceString(String input, int count) {
|
||||||
|
if (input.isEmpty) return [];
|
||||||
|
|
||||||
|
if (input.length % count != 0) {
|
||||||
|
throw ArgumentError("Cannot slice $input in $count slices.");
|
||||||
|
}
|
||||||
|
// final slices = List<String>(count);
|
||||||
|
var slices = List<String>.filled(count, '');
|
||||||
|
|
||||||
|
int len = input.length;
|
||||||
|
int sliceSize = len ~/ count;
|
||||||
|
|
||||||
|
for (var i = 0; i < count; i++) {
|
||||||
|
var start = i * sliceSize;
|
||||||
|
slices[i] = input.substring(start, start + sliceSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
return List.unmodifiable(slices);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<DateFormat> getBlockchainStart() async {
|
||||||
|
////// Manu indexer
|
||||||
|
//// Extract block date. Ugly, I can't find a better way to get the date of the block ?
|
||||||
|
//// The only polkadot issue for that : https://github.com/polkadot-js/api/issues/2603
|
||||||
|
// const created_at = new Date(
|
||||||
|
// signedBlock.block.extrinsics
|
||||||
|
// .filter(
|
||||||
|
// ({ method: { section, method } }) =>
|
||||||
|
// section === 'timestamp' && method === 'set'
|
||||||
|
// )[0]
|
||||||
|
// .args[0].toNumber()
|
||||||
|
// )
|
||||||
|
//// manu rpc
|
||||||
|
// genesis: api.genesisHash.toHex(),
|
||||||
|
// chain: await api.rpc.chain.getHeader(),
|
||||||
|
// chainInfo: await api.registry.getChainProperties(),
|
||||||
|
// test: await api.rpc.state.getPairs('0x')
|
||||||
|
// query block finalisé qui ne change jamais.
|
||||||
|
// api.rpc.chain.subscribeFinalizedHeads
|
||||||
|
// events: await api.rpc.state.getStorage('0x26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7'),
|
||||||
|
// lastFinalizedBlock: await api.rpc.chain.getFinalizedHead()
|
||||||
|
// get block
|
||||||
|
// api.rpc.chain.getFinalizedHead
|
||||||
|
|
||||||
|
// shit
|
||||||
|
// final blockHash =
|
||||||
|
// await sdk.webView!.evalJavascript('api.rpc.chain.getBlockHash(1)');
|
||||||
|
// final Map blockContent = await sdk.webView!
|
||||||
|
// .evalJavascript('api.rpc.chain.getBlock("$blockHash")');
|
||||||
|
// final String dateBrut = blockContent['block']['extrinsics'][0];
|
||||||
|
|
||||||
|
// final dateTextByte = hex.decode(dateBrut.substring(2));
|
||||||
|
|
||||||
|
// final dateText = await sdk.webView!
|
||||||
|
// .evalJavascript('api.tx($dateTextByte)', wrapPromise: false);
|
||||||
|
|
||||||
|
// log.d('aaaaaaaaaaaaaaaaaaaaa: $dateText');
|
||||||
|
return DateFormat();
|
||||||
|
}
|
||||||
|
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
////// 3: SUBSTRATE CONNECTION //////
|
////// 3: SUBSTRATE CONNECTION //////
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
|
@ -400,9 +496,8 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> connectNode(BuildContext ctx) async {
|
Future<void> connectNode(BuildContext ctx) async {
|
||||||
HomeProvider homeProvider = Provider.of<HomeProvider>(ctx, listen: false);
|
final homeProvider = Provider.of<HomeProvider>(ctx, listen: false);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider = Provider.of<MyWalletsProvider>(ctx, listen: false);
|
||||||
Provider.of<MyWalletsProvider>(ctx, listen: false);
|
|
||||||
|
|
||||||
homeProvider.changeMessage("connectionPending".tr(), 0);
|
homeProvider.changeMessage("connectionPending".tr(), 0);
|
||||||
|
|
||||||
|
@ -446,6 +541,9 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
await initCurrencyParameters();
|
await initCurrencyParameters();
|
||||||
await getBalanceRatio();
|
await getBalanceRatio();
|
||||||
|
|
||||||
|
// Indexer
|
||||||
|
getBlockStart();
|
||||||
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
homeProvider.changeMessage(
|
homeProvider.changeMessage(
|
||||||
"wellConnectedToNode"
|
"wellConnectedToNode"
|
||||||
|
@ -568,7 +666,7 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
Future<KeyPairData?> changePassword(BuildContext context, String address,
|
Future<KeyPairData?> changePassword(BuildContext context, String address,
|
||||||
String passOld, String passNew) async {
|
String passOld, String passNew) async {
|
||||||
final account = getKeypair(address);
|
final account = getKeypair(address);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
keyring.setCurrent(account);
|
keyring.setCurrent(account);
|
||||||
myWalletProvider.resetPinCode();
|
myWalletProvider.resetPinCode();
|
||||||
|
@ -680,6 +778,9 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
cryptoType: CryptoType.ed25519,
|
cryptoType: CryptoType.ed25519,
|
||||||
rawSeed: rawSeedHex);
|
rawSeed: rawSeedHex);
|
||||||
|
|
||||||
|
SigningKey rootKey = SigningKey(seed: rawSeed);
|
||||||
|
g1V1OldPubkey = Base58Encode(rootKey.publicKey);
|
||||||
|
|
||||||
g1V1NewAddress = newAddress.address!;
|
g1V1NewAddress = newAddress.address!;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
return g1V1NewAddress;
|
return g1V1NewAddress;
|
||||||
|
@ -695,8 +796,15 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
final fromHasConsumer =
|
final fromHasConsumer =
|
||||||
fromAddress == '' ? false : await hasAccountConsumers(fromAddress);
|
fromAddress == '' ? false : await hasAccountConsumers(fromAddress);
|
||||||
final toIdtyStatus = await idtyStatus(toAddress);
|
final toIdtyStatus = await idtyStatus(toAddress);
|
||||||
|
final isSmithData = await isSmith(fromAddress);
|
||||||
|
|
||||||
return [fromBalance, fromIdtyStatus, toIdtyStatus, fromHasConsumer];
|
return [
|
||||||
|
fromBalance,
|
||||||
|
fromIdtyStatus,
|
||||||
|
toIdtyStatus,
|
||||||
|
fromHasConsumer,
|
||||||
|
isSmithData
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
|
@ -779,7 +887,7 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
List txOptions = [];
|
List txOptions = [];
|
||||||
String? rawParams;
|
String? rawParams;
|
||||||
|
|
||||||
final toCerts = await getCerts(destAddress);
|
final toCerts = await getCertsCounter(destAddress);
|
||||||
|
|
||||||
// log.d('debug: ${currencyParameters['minCertForMembership']}');
|
// log.d('debug: ${currencyParameters['minCertForMembership']}');
|
||||||
|
|
||||||
|
@ -1007,7 +1115,7 @@ void snackNode(BuildContext context, bool isConnected) {
|
||||||
if (!isConnected) {
|
if (!isConnected) {
|
||||||
message = "noDuniterNodeAvailableTryLater".tr();
|
message = "noDuniterNodeAvailableTryLater".tr();
|
||||||
} else {
|
} else {
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
message =
|
message =
|
||||||
"${"youAreConnectedToNode".tr()}\n${sub.getConnectedEndpoint()!.split('//')[1]}";
|
"${"youAreConnectedToNode".tr()}\n${sub.getConnectedEndpoint()!.split('//')[1]}";
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'dart:io';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
@ -51,7 +52,7 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<int> deleteWallet(context, WalletData wallet) async {
|
Future<int> deleteWallet(context, WalletData wallet) async {
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
final bool? answer = await (confirmPopup(
|
final bool? answer = await (confirmPopup(
|
||||||
context, 'areYouSureToForgetWallet'.tr(args: [wallet.name!])));
|
context, 'areYouSureToForgetWallet'.tr(args: [wallet.name!])));
|
||||||
|
|
||||||
|
@ -59,7 +60,7 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
//Check if balance is null
|
//Check if balance is null
|
||||||
final balance = await sub.getBalance(wallet.address!);
|
final balance = await sub.getBalance(wallet.address!);
|
||||||
if (balance != {}) {
|
if (balance != {}) {
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
final defaultWallet = myWalletProvider.getDefaultWallet();
|
final defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
log.d(defaultWallet.address);
|
log.d(defaultWallet.address);
|
||||||
|
@ -134,12 +135,11 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
|
|
||||||
Widget idtyStatus(BuildContext context, String address,
|
Widget idtyStatus(BuildContext context, String address,
|
||||||
{bool isOwner = false, Color color = Colors.black}) {
|
{bool isOwner = false, Color color = Colors.black}) {
|
||||||
DuniterIndexer duniterIndexer =
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
Provider.of<DuniterIndexer>(context, listen: false);
|
|
||||||
|
|
||||||
showText(String text,
|
showText(String text,
|
||||||
[double size = 18, bool bold = false, bool smooth = true]) {
|
[double size = 18, bool bold = false, bool smooth = true]) {
|
||||||
log.d('$address $text');
|
// log.d('$address $text');
|
||||||
return AnimatedFadeOutIn<String>(
|
return AnimatedFadeOutIn<String>(
|
||||||
data: text,
|
data: text,
|
||||||
duration: Duration(milliseconds: smooth ? 200 : 0),
|
duration: Duration(milliseconds: smooth ? 200 : 0),
|
||||||
|
@ -212,18 +212,21 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> isMember(BuildContext context, String address) async {
|
Future<bool> isMember(BuildContext context, String address) async {
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
return await sub.idtyStatus(address) == 'Validated';
|
return await sub.idtyStatus(address) == 'Validated';
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String?> confirmIdentityPopup(BuildContext context) async {
|
Future<String?> confirmIdentityPopup(BuildContext context) async {
|
||||||
TextEditingController idtyName = TextEditingController();
|
TextEditingController idtyName = TextEditingController();
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
WalletOptionsProvider walletOptions =
|
final walletOptions =
|
||||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
|
|
||||||
|
bool canValidate = false;
|
||||||
|
bool idtyExist = false;
|
||||||
|
|
||||||
return showDialog<String>(
|
return showDialog<String>(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: true, // user must tap button!
|
barrierDismissible: true, // user must tap button!
|
||||||
|
@ -240,7 +243,16 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
TextField(
|
TextField(
|
||||||
key: keyEnterIdentityUsername,
|
key: keyEnterIdentityUsername,
|
||||||
onChanged: (_) => notifyListeners(),
|
onChanged: (_) async {
|
||||||
|
idtyExist = await isIdtyExist(idtyName.text);
|
||||||
|
canValidate = !idtyExist &&
|
||||||
|
!await isIdtyExist(idtyName.text) &&
|
||||||
|
idtyName.text.length >= 2 &&
|
||||||
|
idtyName.text.length <= 32;
|
||||||
|
log.d('aaaaaaaaaa: $canValidate');
|
||||||
|
|
||||||
|
notifyListeners();
|
||||||
|
},
|
||||||
inputFormatters: <TextInputFormatter>[
|
inputFormatters: <TextInputFormatter>[
|
||||||
// FilteringTextInputFormatter.allow(RegExp("[0-9a-zA-Z]")),
|
// FilteringTextInputFormatter.allow(RegExp("[0-9a-zA-Z]")),
|
||||||
FilteringTextInputFormatter.deny(RegExp(r'^ ')),
|
FilteringTextInputFormatter.deny(RegExp(r'^ ')),
|
||||||
|
@ -250,7 +262,12 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
controller: idtyName,
|
controller: idtyName,
|
||||||
style: const TextStyle(fontSize: 19),
|
style: const TextStyle(fontSize: 19),
|
||||||
)
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Consumer<WalletOptionsProvider>(builder: (context, wOptions, _) {
|
||||||
|
return Text(idtyExist ? 'Cette identité existe déjà' : '',
|
||||||
|
style: TextStyle(color: Colors.red[500]));
|
||||||
|
})
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
|
@ -261,61 +278,66 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
builder: (context, wOptions, _) {
|
builder: (context, wOptions, _) {
|
||||||
return TextButton(
|
return TextButton(
|
||||||
key: keyConfirm,
|
key: keyConfirm,
|
||||||
|
onPressed: canValidate
|
||||||
|
? () async {
|
||||||
|
idtyName.text =
|
||||||
|
idtyName.text.trim().replaceAll(' ', '');
|
||||||
|
|
||||||
|
if (idtyName.text.length.clamp(3, 32) ==
|
||||||
|
idtyName.text.length) {
|
||||||
|
WalletData? defaultWallet =
|
||||||
|
myWalletProvider.getDefaultWallet();
|
||||||
|
|
||||||
|
String? pin;
|
||||||
|
if (myWalletProvider.pinCode == '') {
|
||||||
|
pin = await Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (homeContext) {
|
||||||
|
return UnlockingWallet(
|
||||||
|
wallet: defaultWallet);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (pin != null ||
|
||||||
|
myWalletProvider.pinCode != '') {
|
||||||
|
final wallet = myWalletProvider
|
||||||
|
.getWalletDataByAddress(address.text);
|
||||||
|
await sub.setCurrentWallet(wallet!);
|
||||||
|
sub.confirmIdentity(walletOptions.address.text,
|
||||||
|
idtyName.text, myWalletProvider.pinCode);
|
||||||
|
Navigator.pop(context);
|
||||||
|
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(builder: (context) {
|
||||||
|
return TransactionInProgress(
|
||||||
|
transType: 'comfirmIdty',
|
||||||
|
fromAddress:
|
||||||
|
getShortPubkey(wallet.address!),
|
||||||
|
toAddress:
|
||||||
|
getShortPubkey(wallet.address!),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
: null,
|
||||||
child: Text(
|
child: Text(
|
||||||
"validate".tr(),
|
"validate".tr(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 21,
|
fontSize: 21,
|
||||||
color: idtyName.text.length.clamp(3, 64) ==
|
color: canValidate
|
||||||
idtyName.text.length
|
? const Color(0xffD80000)
|
||||||
? const Color(0xffD80000)
|
: Colors.grey[500]),
|
||||||
: Colors.grey,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
|
||||||
idtyName.text = idtyName.text.trim().replaceAll(' ', '');
|
|
||||||
|
|
||||||
if (idtyName.text.length.clamp(3, 64) ==
|
|
||||||
idtyName.text.length) {
|
|
||||||
WalletData? defaultWallet =
|
|
||||||
myWalletProvider.getDefaultWallet();
|
|
||||||
|
|
||||||
String? pin;
|
|
||||||
if (myWalletProvider.pinCode == '') {
|
|
||||||
pin = await Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(
|
|
||||||
builder: (homeContext) {
|
|
||||||
return UnlockingWallet(wallet: defaultWallet);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (pin != null || myWalletProvider.pinCode != '') {
|
|
||||||
final wallet = myWalletProvider
|
|
||||||
.getWalletDataByAddress(address.text);
|
|
||||||
await sub.setCurrentWallet(wallet!);
|
|
||||||
sub.confirmIdentity(walletOptions.address.text,
|
|
||||||
idtyName.text, myWalletProvider.pinCode);
|
|
||||||
Navigator.pop(context);
|
|
||||||
|
|
||||||
Navigator.push(
|
|
||||||
context,
|
|
||||||
MaterialPageRoute(builder: (context) {
|
|
||||||
return TransactionInProgress(
|
|
||||||
transType: 'comfirmIdty',
|
|
||||||
fromAddress: getShortPubkey(wallet.address!),
|
|
||||||
toAddress: getShortPubkey(wallet.address!),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20)
|
const SizedBox(height: 5)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -405,7 +427,7 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool canValidateName(BuildContext context, TextEditingController walletName) {
|
bool canValidateName(BuildContext context, TextEditingController walletName) {
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
|
|
||||||
bool isNameValid = walletName.text.length >= 2 &&
|
bool isNameValid = walletName.text.length >= 2 &&
|
||||||
|
@ -585,7 +607,7 @@ Widget getCerts(BuildContext context, String address, double size,
|
||||||
return Column(children: <Widget>[
|
return Column(children: <Widget>[
|
||||||
Consumer<SubstrateSdk>(builder: (context, sdk, _) {
|
Consumer<SubstrateSdk>(builder: (context, sdk, _) {
|
||||||
return FutureBuilder(
|
return FutureBuilder(
|
||||||
future: sdk.getCerts(address),
|
future: sdk.getCertsCounter(address),
|
||||||
builder: (BuildContext context, AsyncSnapshot<List<int>> certs) {
|
builder: (BuildContext context, AsyncSnapshot<List<int>> certs) {
|
||||||
// log.d(_certs.data);
|
// log.d(_certs.data);
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,13 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/g1_wallets_list.dart';
|
import 'package:gecko/models/g1_wallets_list.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
|
||||||
import 'package:gecko/providers/cesium_plus.dart';
|
|
||||||
import 'package:gecko/providers/substrate_sdk.dart';
|
|
||||||
import 'package:gecko/providers/wallet_options.dart';
|
|
||||||
import 'package:gecko/screens/common_elements.dart';
|
|
||||||
import 'package:gecko/screens/wallet_view.dart';
|
import 'package:gecko/screens/wallet_view.dart';
|
||||||
import 'package:jdenticon_dart/jdenticon_dart.dart';
|
import 'package:jdenticon_dart/jdenticon_dart.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
// import 'package:qrscan/qrscan.dart' as scanner;
|
// import 'package:qrscan/qrscan.dart' as scanner;
|
||||||
import 'package:barcode_scan2/barcode_scan2.dart';
|
import 'package:barcode_scan2/barcode_scan2.dart';
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
|
|
||||||
class WalletsProfilesProvider with ChangeNotifier {
|
class WalletsProfilesProvider with ChangeNotifier {
|
||||||
WalletsProfilesProvider(this.address);
|
WalletsProfilesProvider(this.address);
|
||||||
|
@ -44,7 +37,10 @@ class WalletsProfilesProvider with ChangeNotifier {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (context) {
|
MaterialPageRoute(builder: (context) {
|
||||||
return WalletViewScreen(address: barcode!.rawContent);
|
return WalletViewScreen(
|
||||||
|
address: barcode!.rawContent,
|
||||||
|
username: '',
|
||||||
|
);
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -129,102 +125,6 @@ class WalletsProfilesProvider with ChangeNotifier {
|
||||||
return _balance;
|
return _balance;
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget headerProfileView(
|
|
||||||
BuildContext context, String address, String? username) {
|
|
||||||
const double avatarSize = 140;
|
|
||||||
|
|
||||||
WalletOptionsProvider walletOptions =
|
|
||||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
|
||||||
CesiumPlusProvider cesiumPlusProvider =
|
|
||||||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
|
||||||
// SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
|
|
||||||
|
|
||||||
return Stack(children: <Widget>[
|
|
||||||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
|
||||||
bool isAccountExist = balanceCache[address] != 0;
|
|
||||||
return Container(
|
|
||||||
height: 180,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
gradient: LinearGradient(
|
|
||||||
begin: Alignment.topCenter,
|
|
||||||
end: Alignment.bottomCenter,
|
|
||||||
colors: [
|
|
||||||
isAccountExist ? yellowC : Colors.grey[400]!,
|
|
||||||
isAccountExist ? const Color(0xFFE7811A) : Colors.grey[600]!,
|
|
||||||
],
|
|
||||||
),
|
|
||||||
));
|
|
||||||
}),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(left: 30, right: 40),
|
|
||||||
child: Row(children: <Widget>[
|
|
||||||
Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: <Widget>[
|
|
||||||
Container(
|
|
||||||
height: 10,
|
|
||||||
color: yellowC, // Colors.grey[400],
|
|
||||||
),
|
|
||||||
Row(children: [
|
|
||||||
GestureDetector(
|
|
||||||
key: keyCopyAddress,
|
|
||||||
onTap: () {
|
|
||||||
Clipboard.setData(ClipboardData(text: address));
|
|
||||||
snackCopyKey(context);
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
getShortPubkey(address),
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 30,
|
|
||||||
fontWeight: FontWeight.w800,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]),
|
|
||||||
const SizedBox(height: 25),
|
|
||||||
balance(context, address, 22),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
walletOptions.idtyStatus(context, address,
|
|
||||||
isOwner: false, color: Colors.black),
|
|
||||||
getCerts(context, address, 14),
|
|
||||||
// if (username == null &&
|
|
||||||
// g1WalletsBox.get(address)?.username != null)
|
|
||||||
// SizedBox(
|
|
||||||
// width: 230,
|
|
||||||
// child: Text(
|
|
||||||
// g1WalletsBox.get(address)?.username ?? '',
|
|
||||||
// style: const TextStyle(
|
|
||||||
// fontSize: 27,
|
|
||||||
// color: Color(0xff814C00),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// if (username != null)
|
|
||||||
// SizedBox(
|
|
||||||
// width: 230,
|
|
||||||
// child: Text(
|
|
||||||
// username,
|
|
||||||
// style: const TextStyle(
|
|
||||||
// fontSize: 27,
|
|
||||||
// color: Color(0xff814C00),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
const SizedBox(height: 55),
|
|
||||||
]),
|
|
||||||
const Spacer(),
|
|
||||||
Column(children: <Widget>[
|
|
||||||
ClipOval(
|
|
||||||
child: cesiumPlusProvider.defaultAvatar(avatarSize),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 25),
|
|
||||||
]),
|
|
||||||
]),
|
|
||||||
),
|
|
||||||
CommonElements().offlineInfo(context),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isContact(String address) {
|
bool isContact(String address) {
|
||||||
return contactsBox.containsKey(address);
|
return contactsBox.containsKey(address);
|
||||||
}
|
}
|
||||||
|
@ -252,3 +152,12 @@ snackCopyKey(context) {
|
||||||
duration: const Duration(seconds: 2));
|
duration: const Duration(seconds: 2));
|
||||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
snackCopySeed(context) {
|
||||||
|
final snackBar = SnackBar(
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
content: Text("thisMnemonicHasBeenCopiedToClipboard".tr(),
|
||||||
|
style: const TextStyle(fontSize: 17)),
|
||||||
|
duration: const Duration(seconds: 4));
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// ignore_for_file: must_be_immutable
|
// ignore_for_file: must_be_immutable
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/queries_indexer.dart';
|
import 'package:gecko/models/queries_indexer.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
@ -9,9 +9,9 @@ import 'package:gecko/providers/cesium_plus.dart';
|
||||||
import 'package:gecko/providers/duniter_indexer.dart';
|
import 'package:gecko/providers/duniter_indexer.dart';
|
||||||
import 'package:gecko/providers/home.dart';
|
import 'package:gecko/providers/home.dart';
|
||||||
import 'package:gecko/providers/substrate_sdk.dart';
|
import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
import 'package:gecko/providers/wallets_profiles.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/screens/wallet_view.dart';
|
import 'package:gecko/screens/wallet_view.dart';
|
||||||
|
import 'package:gecko/widgets/header_profile.dart';
|
||||||
import 'package:graphql_flutter/graphql_flutter.dart';
|
import 'package:graphql_flutter/graphql_flutter.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
@ -31,12 +31,11 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
WalletsProfilesProvider walletProfile =
|
|
||||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
|
||||||
HomeProvider homeProvider =
|
HomeProvider homeProvider =
|
||||||
Provider.of<HomeProvider>(context, listen: false);
|
Provider.of<HomeProvider>(context, listen: false);
|
||||||
|
|
||||||
|
// log.d('aaaaaaaaaaaaaaaaaaaaa $startBlockchainTime');
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
key: _scaffoldKey,
|
key: _scaffoldKey,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
@ -49,17 +48,16 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
||||||
),
|
),
|
||||||
bottomNavigationBar: homeProvider.bottomAppBar(context),
|
bottomNavigationBar: homeProvider.bottomAppBar(context),
|
||||||
body: Column(children: <Widget>[
|
body: Column(children: <Widget>[
|
||||||
walletProfile.headerProfileView(context, address, username),
|
HeaderProfile(address: address, username: username),
|
||||||
historyQuery(context),
|
historyQuery(context),
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget historyQuery(context) {
|
Widget historyQuery(context) {
|
||||||
DuniterIndexer duniterIndexer =
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
Provider.of<DuniterIndexer>(context, listen: false);
|
|
||||||
|
|
||||||
if (indexerEndpoint == '') {
|
if (indexerEndpoint == '') {
|
||||||
Column(children: <Widget>[
|
return Column(children: <Widget>[
|
||||||
const SizedBox(height: 50),
|
const SizedBox(height: 50),
|
||||||
Text(
|
Text(
|
||||||
"noNetworkNoHistory".tr(),
|
"noNetworkNoHistory".tr(),
|
||||||
|
@ -158,8 +156,7 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget historyView(context, result) {
|
Widget historyView(context, result) {
|
||||||
DuniterIndexer duniterIndexer =
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
Provider.of<DuniterIndexer>(context, listen: false);
|
|
||||||
|
|
||||||
return duniterIndexer.transBC == null
|
return duniterIndexer.transBC == null
|
||||||
? Column(children: <Widget>[
|
? Column(children: <Widget>[
|
||||||
|
@ -193,9 +190,6 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
||||||
|
|
||||||
Widget getTransactionTile(
|
Widget getTransactionTile(
|
||||||
BuildContext context, DuniterIndexer duniterIndexer) {
|
BuildContext context, DuniterIndexer duniterIndexer) {
|
||||||
CesiumPlusProvider cesiumPlusProvider =
|
|
||||||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
|
||||||
|
|
||||||
int keyID = 0;
|
int keyID = 0;
|
||||||
String? dateDelimiter;
|
String? dateDelimiter;
|
||||||
String? lastDateDelimiter;
|
String? lastDateDelimiter;
|
||||||
|
@ -204,6 +198,8 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
||||||
bool isTody = false;
|
bool isTody = false;
|
||||||
bool isYesterday = false;
|
bool isYesterday = false;
|
||||||
bool isThisWeek = false;
|
bool isThisWeek = false;
|
||||||
|
bool isMigrationTime = false;
|
||||||
|
bool isMigrationTimePassed = false;
|
||||||
|
|
||||||
final Map<int, String> monthsInYear = {
|
final Map<int, String> monthsInYear = {
|
||||||
1: "month1".tr(),
|
1: "month1".tr(),
|
||||||
|
@ -286,7 +282,25 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
||||||
finalAmount = '$amount $currencyName';
|
finalAmount = '$amount $currencyName';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isMigrationTimePassed && date.compareTo(startBlockchainTime) < 0) {
|
||||||
|
isMigrationTimePassed = true;
|
||||||
|
isMigrationTime = true;
|
||||||
|
} else {
|
||||||
|
isMigrationTime = false;
|
||||||
|
}
|
||||||
|
|
||||||
return Column(children: <Widget>[
|
return Column(children: <Widget>[
|
||||||
|
if (isMigrationTime)
|
||||||
|
const Padding(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 30),
|
||||||
|
child: Text(
|
||||||
|
'Début de la ĞDev',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
color: Colors.blueAccent,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
),
|
||||||
if (dateDelimiter != null)
|
if (dateDelimiter != null)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 30),
|
padding: const EdgeInsets.symmetric(vertical: 30),
|
||||||
|
@ -305,7 +319,7 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
||||||
contentPadding: const EdgeInsets.only(
|
contentPadding: const EdgeInsets.only(
|
||||||
left: 20, right: 30, top: 15, bottom: 15),
|
left: 20, right: 30, top: 15, bottom: 15),
|
||||||
leading: ClipOval(
|
leading: ClipOval(
|
||||||
child: cesiumPlusProvider.defaultAvatar(avatarSize),
|
child: defaultAvatar(avatarSize),
|
||||||
),
|
),
|
||||||
title: Padding(
|
title: Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 5),
|
padding: const EdgeInsets.only(bottom: 5),
|
||||||
|
@ -353,7 +367,10 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (context) {
|
MaterialPageRoute(builder: (context) {
|
||||||
return WalletViewScreen(address: repository[1]);
|
return WalletViewScreen(
|
||||||
|
address: repository[1],
|
||||||
|
username: username ?? '',
|
||||||
|
);
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
// Navigator.pop(context);
|
// Navigator.pop(context);
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
import 'package:accordion/controllers.dart';
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:gecko/globals.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:gecko/widgets/certs_received.dart';
|
||||||
|
import 'package:gecko/widgets/certs_counter.dart';
|
||||||
|
import 'package:gecko/widgets/certs_sent.dart';
|
||||||
|
import 'package:accordion/accordion.dart';
|
||||||
|
|
||||||
|
class CertificationsScreen extends StatelessWidget {
|
||||||
|
const CertificationsScreen(
|
||||||
|
{Key? key, required this.address, required this.username})
|
||||||
|
: super(key: key);
|
||||||
|
final String address;
|
||||||
|
final String username;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: backgroundColor,
|
||||||
|
appBar: AppBar(
|
||||||
|
elevation: 0,
|
||||||
|
toolbarHeight: 60 * ratio,
|
||||||
|
title: SizedBox(
|
||||||
|
height: 22,
|
||||||
|
child: Text('Certifications de $username'),
|
||||||
|
)),
|
||||||
|
body: SafeArea(
|
||||||
|
child: Accordion(
|
||||||
|
paddingListTop: 10,
|
||||||
|
paddingListBottom: 10,
|
||||||
|
maxOpenSections: 1,
|
||||||
|
headerBackgroundColorOpened: orangeC,
|
||||||
|
scaleWhenAnimating: true,
|
||||||
|
openAndCloseAnimation: true,
|
||||||
|
headerPadding:
|
||||||
|
const EdgeInsets.symmetric(vertical: 7, horizontal: 15),
|
||||||
|
sectionOpeningHapticFeedback: SectionHapticFeedback.heavy,
|
||||||
|
sectionClosingHapticFeedback: SectionHapticFeedback.light,
|
||||||
|
children: [
|
||||||
|
AccordionSection(
|
||||||
|
isOpen: true,
|
||||||
|
leftIcon:
|
||||||
|
const Icon(Icons.insights_rounded, color: Colors.black),
|
||||||
|
headerBackgroundColor: yellowC,
|
||||||
|
headerBackgroundColorOpened: orangeC,
|
||||||
|
header: Row(children: [
|
||||||
|
Text('received'.tr()),
|
||||||
|
const SizedBox(width: 5),
|
||||||
|
CertsCounter(address: address)
|
||||||
|
]),
|
||||||
|
content: CertsReceived(address: address),
|
||||||
|
contentHorizontalPadding: 0,
|
||||||
|
contentBorderWidth: 1,
|
||||||
|
),
|
||||||
|
AccordionSection(
|
||||||
|
isOpen: false,
|
||||||
|
leftIcon:
|
||||||
|
const Icon(Icons.insights_rounded, color: Colors.black),
|
||||||
|
headerBackgroundColor: yellowC,
|
||||||
|
headerBackgroundColorOpened: orangeC,
|
||||||
|
header: Row(children: [
|
||||||
|
Text('sent'.tr()),
|
||||||
|
const SizedBox(width: 5),
|
||||||
|
CertsCounter(address: address, isSent: true)
|
||||||
|
]),
|
||||||
|
content: CertsSent(address: address),
|
||||||
|
contentHorizontalPadding: 20,
|
||||||
|
contentBorderWidth: 1,
|
||||||
|
// onOpenSection: () => print('onOpenSection ...'),
|
||||||
|
// onCloseSection: () => print('onCloseSection ...'),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
|
@ -160,7 +160,7 @@ class CommonElements {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget offlineInfo(BuildContext context) {
|
Widget offlineInfo(BuildContext context) {
|
||||||
final double screenWidth = MediaQuery.of(homeContext).size.width;
|
final screenWidth = MediaQuery.of(homeContext).size.width;
|
||||||
return Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
return Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||||
return Visibility(
|
return Visibility(
|
||||||
visible: !sub.nodeConnected,
|
visible: !sub.nodeConnected,
|
||||||
|
@ -279,6 +279,92 @@ Future<bool?> confirmPopup(BuildContext context, String title) async {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<bool?> confirmPopupCertification(BuildContext context, String question1,
|
||||||
|
String username, String question2, String address) async {
|
||||||
|
return showDialog<bool>(
|
||||||
|
context: context,
|
||||||
|
barrierDismissible: true,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return AlertDialog(
|
||||||
|
// actionsPadding: const EdgeInsets.all(0.0),
|
||||||
|
backgroundColor: backgroundColor,
|
||||||
|
content: SizedBox(
|
||||||
|
height: 240,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 15),
|
||||||
|
Text(
|
||||||
|
question1,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style:
|
||||||
|
const TextStyle(fontSize: 20, fontWeight: FontWeight.w400),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
Text(
|
||||||
|
username,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style:
|
||||||
|
const TextStyle(fontSize: 24, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
Text(
|
||||||
|
question2,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style:
|
||||||
|
const TextStyle(fontSize: 20, fontWeight: FontWeight.w400),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
Text(
|
||||||
|
address,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style:
|
||||||
|
const TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
const Text(
|
||||||
|
'?',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w400),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
actions: <Widget>[
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
TextButton(
|
||||||
|
key: keyConfirm,
|
||||||
|
child: Text(
|
||||||
|
"yes".tr(),
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
color: Color(0xffD80000),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context, true);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(width: 35),
|
||||||
|
TextButton(
|
||||||
|
child: Text(
|
||||||
|
"no".tr(),
|
||||||
|
style: const TextStyle(fontSize: 25),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.pop(context, false);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(height: 120)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> infoPopup(BuildContext context, String title) async {
|
Future<void> infoPopup(BuildContext context, String title) async {
|
||||||
return showDialog<void>(
|
return showDialog<void>(
|
||||||
context: context,
|
context: context,
|
||||||
|
|
|
@ -22,7 +22,7 @@ import 'package:gecko/screens/myWallets/wallets_home.dart';
|
||||||
import 'package:gecko/screens/onBoarding/1.dart';
|
import 'package:gecko/screens/onBoarding/1.dart';
|
||||||
import 'package:gecko/screens/search.dart';
|
import 'package:gecko/screens/search.dart';
|
||||||
import 'package:gecko/screens/settings.dart';
|
import 'package:gecko/screens/settings.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:gecko/screens/my_contacts.dart';
|
import 'package:gecko/screens/my_contacts.dart';
|
||||||
|
|
||||||
|
@ -32,11 +32,10 @@ class HomeScreen extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
homeContext = context;
|
homeContext = context;
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||||
Provider.of<MyWalletsProvider>(context);
|
|
||||||
Provider.of<ChestProvider>(context);
|
Provider.of<ChestProvider>(context);
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
final bool isWalletsExists = myWalletProvider.checkIfWalletExist();
|
final bool isWalletsExists = myWalletProvider.checkIfWalletExist();
|
||||||
|
|
||||||
|
@ -104,7 +103,7 @@ class HomeScreen extends StatelessWidget {
|
||||||
builder: (ctx) => StatefulWrapper(
|
builder: (ctx) => StatefulWrapper(
|
||||||
onInit: () {
|
onInit: () {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||||
DuniterIndexer duniterIndexer =
|
final duniterIndexer =
|
||||||
Provider.of<DuniterIndexer>(ctx, listen: false);
|
Provider.of<DuniterIndexer>(ctx, listen: false);
|
||||||
duniterIndexer.getValidIndexerEndpoint();
|
duniterIndexer.getValidIndexerEndpoint();
|
||||||
|
|
||||||
|
@ -183,12 +182,12 @@ class HomeScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget geckHome(context) {
|
Widget geckHome(context) {
|
||||||
MyWalletsProvider myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||||
Provider.of<ChestProvider>(context);
|
Provider.of<ChestProvider>(context);
|
||||||
|
|
||||||
WalletsProfilesProvider historyProvider =
|
WalletsProfilesProvider historyProvider =
|
||||||
Provider.of<WalletsProfilesProvider>(context);
|
Provider.of<WalletsProfilesProvider>(context);
|
||||||
final double statusBarHeight = MediaQuery.of(context).padding.top;
|
final statusBarHeight = MediaQuery.of(context).padding.top;
|
||||||
return Container(
|
return Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
|
@ -434,7 +433,7 @@ Widget geckHome(context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget welcomeHome(context) {
|
Widget welcomeHome(context) {
|
||||||
final double statusBarHeight = MediaQuery.of(context).padding.top;
|
final statusBarHeight = MediaQuery.of(context).padding.top;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:durt/durt.dart';
|
import 'package:durt/durt.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/stateful_wrapper.dart';
|
import 'package:gecko/models/stateful_wrapper.dart';
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
|
@ -26,9 +26,8 @@ class ChangePinScreen extends StatelessWidget with ChangeNotifier {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final myWalletProvider =
|
||||||
MyWalletsProvider myWalletProvider =
|
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
|
|
||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/chest_data.dart';
|
import 'package:gecko/models/chest_data.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:gecko/providers/chest_provider.dart';
|
import 'package:gecko/providers/chest_provider.dart';
|
||||||
|
@ -25,9 +25,7 @@ class ChestOptions extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final chestProvider = Provider.of<ChestProvider>(context, listen: false);
|
||||||
ChestProvider chestProvider =
|
|
||||||
Provider.of<ChestProvider>(context, listen: false);
|
|
||||||
HomeProvider homeProvider =
|
HomeProvider homeProvider =
|
||||||
Provider.of<HomeProvider>(context, listen: false);
|
Provider.of<HomeProvider>(context, listen: false);
|
||||||
|
|
||||||
|
@ -61,7 +59,7 @@ class ChestOptions extends StatelessWidget {
|
||||||
InkWell(
|
InkWell(
|
||||||
key: keyShowSeed,
|
key: keyShowSeed,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
WalletData? defaultWallet =
|
WalletData? defaultWallet =
|
||||||
myWalletProvider.getDefaultWallet();
|
myWalletProvider.getDefaultWallet();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// ignore_for_file: use_build_context_synchronously
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:gecko/providers/my_wallets.dart';
|
import 'package:gecko/providers/my_wallets.dart';
|
||||||
|
@ -30,9 +30,7 @@ class _ChooseChestState extends State<ChooseChest> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||||
MyWalletsProvider myWalletProvider =
|
|
||||||
Provider.of<MyWalletsProvider>(context);
|
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
|
@ -23,8 +23,7 @@ class ChooseWalletScreen extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
|
||||||
final int chest = configBox.get('currentChest');
|
final int chest = configBox.get('currentChest');
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
@ -73,9 +72,7 @@ class ChooseWalletScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget myWalletsTiles(BuildContext context, int currentChest) {
|
Widget myWalletsTiles(BuildContext context, int currentChest) {
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||||
Provider.of<MyWalletsProvider>(context);
|
|
||||||
// SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
|
|
||||||
|
|
||||||
final bool isWalletsExists = myWalletProvider.checkIfWalletExist();
|
final bool isWalletsExists = myWalletProvider.checkIfWalletExist();
|
||||||
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
|
@ -98,7 +95,7 @@ class ChooseWalletScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
List listWallets = myWalletProvider.listWallets;
|
List listWallets = myWalletProvider.listWallets;
|
||||||
final double screenWidth = MediaQuery.of(context).size.width;
|
final screenWidth = MediaQuery.of(context).size.width;
|
||||||
int nTule = 2;
|
int nTule = 2;
|
||||||
|
|
||||||
if (screenWidth >= 900) {
|
if (screenWidth >= 900) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// ignore_for_file: use_build_context_synchronously
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
|
@ -27,8 +27,7 @@ class _CustomDerivationState extends State<CustomDerivation> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final myWalletProvider =
|
||||||
MyWalletsProvider myWalletProvider =
|
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
|
|
||||||
final derivationList = <String>[
|
final derivationList = <String>[
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'dart:async';
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
|
@ -21,10 +22,9 @@ class ImportG1v1 extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final walletOptions =
|
||||||
WalletOptionsProvider walletOptions =
|
|
||||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
|
|
||||||
Timer? debounce;
|
Timer? debounce;
|
||||||
|
@ -83,6 +83,7 @@ class ImportG1v1 extends StatelessWidget {
|
||||||
final String idtyStatus = status.data?[1];
|
final String idtyStatus = status.data?[1];
|
||||||
final String myIdtyStatus = status.data?[2];
|
final String myIdtyStatus = status.data?[2];
|
||||||
final bool hasConsumer = status.data?[3] ?? false;
|
final bool hasConsumer = status.data?[3] ?? false;
|
||||||
|
final bool isSmith = status.data?[4] ?? false;
|
||||||
|
|
||||||
// log.d('hasconsumer: $hasConsumer');
|
// log.d('hasconsumer: $hasConsumer');
|
||||||
|
|
||||||
|
@ -92,7 +93,7 @@ class ImportG1v1 extends StatelessWidget {
|
||||||
} else {
|
} else {
|
||||||
canValidate = false;
|
canValidate = false;
|
||||||
validationStatus = hasConsumer
|
validationStatus = hasConsumer
|
||||||
? 'youMustWaitBeforeCashoutThisAccount'.tr(args: ['X'])
|
? 'youMustWaitBeforeCashoutThisAccount'.tr()
|
||||||
: 'thisAccountIsEmpty'.tr();
|
: 'thisAccountIsEmpty'.tr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,6 +103,11 @@ class ImportG1v1 extends StatelessWidget {
|
||||||
'youCannotMigrateIdentityToExistingIdentity'.tr();
|
'youCannotMigrateIdentityToExistingIdentity'.tr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isSmith) {
|
||||||
|
canValidate = false;
|
||||||
|
validationStatus = 'smithCantMigrateIdentity'.tr();
|
||||||
|
}
|
||||||
|
|
||||||
if (sub.g1V1NewAddress == '') {
|
if (sub.g1V1NewAddress == '') {
|
||||||
validationStatus = '';
|
validationStatus = '';
|
||||||
}
|
}
|
||||||
|
@ -185,13 +191,13 @@ class ImportG1v1 extends StatelessWidget {
|
||||||
key: keyCopyAddress,
|
key: keyCopyAddress,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Clipboard.setData(
|
Clipboard.setData(
|
||||||
ClipboardData(text: sub.g1V1NewAddress));
|
ClipboardData(text: sub.g1V1OldPubkey));
|
||||||
snackCopyKey(context);
|
snackCopyKey(context);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
getShortPubkey(sub.g1V1NewAddress),
|
sub.g1V1OldPubkey,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -308,7 +314,7 @@ class ImportG1v1 extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
void resetScreen(BuildContext context) {
|
void resetScreen(BuildContext context) {
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
sub.csSalt.text = '';
|
sub.csSalt.text = '';
|
||||||
sub.csPassword.text = '';
|
sub.csPassword.text = '';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// ignore_for_file: use_build_context_synchronously
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
|
@ -27,7 +27,6 @@ class ManageMembership extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
final sub = Provider.of<SubstrateSdk>(context);
|
final sub = Provider.of<SubstrateSdk>(context);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
@ -116,9 +115,9 @@ class ManageMembership extends StatelessWidget {
|
||||||
false;
|
false;
|
||||||
|
|
||||||
if (answer) {
|
if (answer) {
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
// MyWalletsProvider mw = MyWalletsProvider();
|
// MyWalletsProvider mw = MyWalletsProvider();
|
||||||
// final wallet = mw.getWalletDataByAddress(address);
|
// final wallet = mw.getWalletDataByAddress(address);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// ignore_for_file: use_build_context_synchronously
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -20,14 +20,12 @@ class MigrateIdentityScreen extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
// final _homeProvider = Provider.of<HomeProvider>(context);
|
||||||
// HomeProvider _homeProvider = Provider.of<HomeProvider>(context);
|
final walletOptions =
|
||||||
WalletOptionsProvider walletOptions =
|
|
||||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
DuniterIndexer duniterIndexer =
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
Provider.of<DuniterIndexer>(context, listen: false);
|
|
||||||
|
|
||||||
final fromAddress = walletOptions.address.text;
|
final fromAddress = walletOptions.address.text;
|
||||||
final defaultWallet = myWalletProvider.getDefaultWallet();
|
final defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
|
@ -103,12 +101,21 @@ class MigrateIdentityScreen extends StatelessWidget {
|
||||||
final String idtyStatus = status.data?[1];
|
final String idtyStatus = status.data?[1];
|
||||||
final String myIdtyStatus = status.data?[2];
|
final String myIdtyStatus = status.data?[2];
|
||||||
final bool hasConsumer = status.data?[3] ?? false;
|
final bool hasConsumer = status.data?[3] ?? false;
|
||||||
|
final bool isSmith = status.data?[4] ?? false;
|
||||||
|
|
||||||
// log.d('hasconsumer: $hasConsumer');
|
// log.d('hasconsumer: $hasConsumer');
|
||||||
|
|
||||||
if (balance['transferableBalance'] != 0 && !hasConsumer) {
|
if (isSmith) {
|
||||||
|
canValidate = false;
|
||||||
|
validationStatus = 'smithCantMigrateIdentity'.tr();
|
||||||
|
} else if (balance['transferableBalance'] != 0 &&
|
||||||
|
!hasConsumer) {
|
||||||
canValidate = true;
|
canValidate = true;
|
||||||
validationStatus = '';
|
validationStatus = '';
|
||||||
|
} else if (idtyStatus != 'noid' && myIdtyStatus != 'noid') {
|
||||||
|
canValidate = false;
|
||||||
|
validationStatus =
|
||||||
|
'youCannotMigrateIdentityToExistingIdentity'.tr();
|
||||||
} else {
|
} else {
|
||||||
canValidate = false;
|
canValidate = false;
|
||||||
validationStatus = hasConsumer
|
validationStatus = hasConsumer
|
||||||
|
@ -116,12 +123,6 @@ class MigrateIdentityScreen extends StatelessWidget {
|
||||||
: 'thisAccountIsEmpty'.tr();
|
: 'thisAccountIsEmpty'.tr();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idtyStatus != 'noid' && myIdtyStatus != 'noid') {
|
|
||||||
canValidate = false;
|
|
||||||
validationStatus =
|
|
||||||
'youCannotMigrateIdentityToExistingIdentity'.tr();
|
|
||||||
}
|
|
||||||
|
|
||||||
log.d(
|
log.d(
|
||||||
'tatatata: ${sub.g1V1NewAddress}, ${selectedWallet.address!}, $balance, $idtyStatus, $myIdtyStatus');
|
'tatatata: ${sub.g1V1NewAddress}, ${selectedWallet.address!}, $balance, $idtyStatus, $myIdtyStatus');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:bubble/bubble.dart';
|
import 'package:bubble/bubble.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
@ -19,10 +19,8 @@ class RestoreChest extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final genW = Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||||
GenerateWalletsProvider genW =
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
|
||||||
|
|
||||||
genW.actualWallet = null;
|
genW.actualWallet = null;
|
||||||
if (genW.isSentenceComplete(context)) {
|
if (genW.isSentenceComplete(context)) {
|
||||||
|
@ -183,7 +181,7 @@ class RestoreChest extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget arrayCell(BuildContext context, TextEditingController cellCtl) {
|
Widget arrayCell(BuildContext context, TextEditingController cellCtl) {
|
||||||
GenerateWalletsProvider generateWalletProvider =
|
final generateWalletProvider =
|
||||||
Provider.of<GenerateWalletsProvider>(context);
|
Provider.of<GenerateWalletsProvider>(context);
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:gecko/providers/my_wallets.dart';
|
import 'package:gecko/providers/my_wallets.dart';
|
||||||
import 'package:gecko/providers/substrate_sdk.dart';
|
import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
|
import 'package:gecko/providers/wallets_profiles.dart';
|
||||||
import 'package:gecko/screens/common_elements.dart';
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
import 'package:pdf/pdf.dart';
|
import 'package:pdf/pdf.dart';
|
||||||
import 'package:printing/printing.dart';
|
import 'package:printing/printing.dart';
|
||||||
|
@ -23,12 +25,11 @@ class ShowSeed extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final myWalletProvider =
|
||||||
MyWalletsProvider myWalletProvider =
|
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
CommonElements common = CommonElements();
|
CommonElements common = CommonElements();
|
||||||
|
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
WalletData defaultWallet = myWalletProvider.getDefaultWallet();
|
WalletData defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
|
|
||||||
|
@ -83,7 +84,7 @@ class ShowSeed extends StatelessWidget {
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Clipboard.setData(
|
Clipboard.setData(
|
||||||
ClipboardData(text: seed.data));
|
ClipboardData(text: seed.data));
|
||||||
snackCopyKey(context);
|
snackCopySeed(context);
|
||||||
},
|
},
|
||||||
child: Row(children: <Widget>[
|
child: Row(children: <Widget>[
|
||||||
Image.asset(
|
Image.asset(
|
||||||
|
@ -141,16 +142,6 @@ class ShowSeed extends StatelessWidget {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
snackCopyKey(context) {
|
|
||||||
const snackBar = SnackBar(
|
|
||||||
padding: EdgeInsets.all(20),
|
|
||||||
content: Text(
|
|
||||||
"Votre phrase de restauration a été copié dans votre presse-papier.",
|
|
||||||
style: TextStyle(fontSize: 16)),
|
|
||||||
duration: Duration(seconds: 2));
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget sentanceArray(BuildContext context, List mnemonic) {
|
Widget sentanceArray(BuildContext context, List mnemonic) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 3),
|
padding: const EdgeInsets.symmetric(horizontal: 3),
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/models/chest_data.dart';
|
import 'package:gecko/models/chest_data.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:gecko/providers/substrate_sdk.dart';
|
import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
|
@ -30,9 +30,7 @@ class UnlockingWallet extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final walletOptions = Provider.of<WalletOptionsProvider>(context);
|
||||||
WalletOptionsProvider walletOptions =
|
|
||||||
Provider.of<WalletOptionsProvider>(context);
|
|
||||||
// final double statusBarHeight = MediaQuery.of(context).padding.top;
|
// final double statusBarHeight = MediaQuery.of(context).padding.top;
|
||||||
|
|
||||||
currentChestNumber = configBox.get('currentChest');
|
currentChestNumber = configBox.get('currentChest');
|
||||||
|
@ -163,11 +161,9 @@ class UnlockingWallet extends StatelessWidget {
|
||||||
StreamController<ErrorAnimationType> errorController =
|
StreamController<ErrorAnimationType> errorController =
|
||||||
StreamController<ErrorAnimationType>();
|
StreamController<ErrorAnimationType>();
|
||||||
TextEditingController enterPin = TextEditingController();
|
TextEditingController enterPin = TextEditingController();
|
||||||
WalletOptionsProvider walletOptions =
|
final walletOptions = Provider.of<WalletOptionsProvider>(context);
|
||||||
Provider.of<WalletOptionsProvider>(context);
|
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||||
MyWalletsProvider myWalletProvider =
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
Provider.of<MyWalletsProvider>(context);
|
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
|
||||||
FocusNode pinFocus = FocusNode();
|
FocusNode pinFocus = FocusNode();
|
||||||
|
|
||||||
WalletData defaultWallet = myWalletProvider.getDefaultWallet();
|
WalletData defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:gecko/providers/duniter_indexer.dart';
|
import 'package:gecko/providers/duniter_indexer.dart';
|
||||||
|
@ -11,12 +12,14 @@ import 'package:gecko/models/wallet_data.dart';
|
||||||
import 'package:gecko/providers/substrate_sdk.dart';
|
import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
import 'package:gecko/providers/wallet_options.dart';
|
import 'package:gecko/providers/wallet_options.dart';
|
||||||
import 'package:gecko/providers/wallets_profiles.dart';
|
import 'package:gecko/providers/wallets_profiles.dart';
|
||||||
|
import 'package:gecko/screens/certifications.dart';
|
||||||
import 'package:gecko/screens/common_elements.dart';
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
import 'package:gecko/screens/activity.dart';
|
import 'package:gecko/screens/activity.dart';
|
||||||
import 'package:gecko/screens/myWallets/manage_membership.dart';
|
import 'package:gecko/screens/myWallets/manage_membership.dart';
|
||||||
import 'package:gecko/screens/qrcode_fullscreen.dart';
|
import 'package:gecko/screens/qrcode_fullscreen.dart';
|
||||||
|
import 'package:gecko/widgets/page_route_no_transition.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:qr_flutter/qr_flutter.dart';
|
import 'package:qr_flutter/qr_flutter.dart';
|
||||||
|
|
||||||
class WalletOptions extends StatelessWidget {
|
class WalletOptions extends StatelessWidget {
|
||||||
|
@ -26,25 +29,23 @@ class WalletOptions extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final walletOptions =
|
||||||
WalletOptionsProvider walletOptions =
|
|
||||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||||
WalletsProfilesProvider historyProvider =
|
WalletsProfilesProvider historyProvider =
|
||||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
HomeProvider homeProvider =
|
HomeProvider homeProvider =
|
||||||
Provider.of<HomeProvider>(context, listen: false);
|
Provider.of<HomeProvider>(context, listen: false);
|
||||||
DuniterIndexer duniterIndexer =
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
Provider.of<DuniterIndexer>(context, listen: false);
|
|
||||||
|
|
||||||
// SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
// final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
// sub.spawnBlock();
|
// sub.spawnBlock();
|
||||||
// sub.spawnBlock(0, 20);
|
// sub.spawnBlock(0, 20);
|
||||||
|
|
||||||
log.d(walletOptions.address.text);
|
log.d(walletOptions.address.text);
|
||||||
|
|
||||||
final int currentChest = myWalletProvider.getCurrentChest();
|
final currentChest = myWalletProvider.getCurrentChest();
|
||||||
|
|
||||||
// final currentWallet = _myWalletProvider.getDefaultWallet();
|
// final currentWallet = _myWalletProvider.getDefaultWallet();
|
||||||
// log.d(_walletOptions.getAddress(_currentChest, 3));
|
// log.d(_walletOptions.getAddress(_currentChest, 3));
|
||||||
|
@ -144,16 +145,38 @@ class WalletOptions extends StatelessWidget {
|
||||||
balance(
|
balance(
|
||||||
context, walletProvider.address.text, 21),
|
context, walletProvider.address.text, 21),
|
||||||
const SizedBox(width: 30),
|
const SizedBox(width: 30),
|
||||||
Column(
|
|
||||||
crossAxisAlignment:
|
InkWell(
|
||||||
CrossAxisAlignment.center,
|
onTap: () => duniterIndexer.walletNameIndexer[
|
||||||
children: [
|
walletProvider.address.text] !=
|
||||||
walletOptions.idtyStatus(
|
null
|
||||||
context, walletOptions.address.text,
|
? {
|
||||||
isOwner: true, color: orangeC),
|
Navigator.push(
|
||||||
getCerts(context,
|
context,
|
||||||
walletProvider.address.text, 15),
|
PageNoTransit(builder: (context) {
|
||||||
]),
|
return CertificationsScreen(
|
||||||
|
address: walletProvider
|
||||||
|
.address.text,
|
||||||
|
username: duniterIndexer
|
||||||
|
.walletNameIndexer[
|
||||||
|
walletProvider
|
||||||
|
.address.text]!);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
walletOptions.idtyStatus(
|
||||||
|
context, walletOptions.address.text,
|
||||||
|
isOwner: true, color: orangeC),
|
||||||
|
getCerts(context,
|
||||||
|
walletProvider.address.text, 15),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
|
||||||
SizedBox(height: 10 * ratio),
|
SizedBox(height: 10 * ratio),
|
||||||
]),
|
]),
|
||||||
const Spacer(flex: 2),
|
const Spacer(flex: 2),
|
||||||
|
@ -302,7 +325,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
foregroundColor: Colors.white, elevation: 4,
|
foregroundColor: Colors.white, elevation: 4,
|
||||||
backgroundColor: orangeC, // foreground
|
backgroundColor: orangeC, // foreground
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () async {
|
||||||
walletProvider.confirmIdentityPopup(context);
|
walletProvider.confirmIdentityPopup(context);
|
||||||
// Navigator.push(
|
// Navigator.push(
|
||||||
// context,
|
// context,
|
||||||
|
@ -337,7 +360,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget pubkeyWidget(WalletOptionsProvider walletProvider, BuildContext ctx) {
|
Widget pubkeyWidget(WalletOptionsProvider walletProvider, BuildContext ctx) {
|
||||||
final String shortPubkey = getShortPubkey(walletProvider.address.text);
|
final shortPubkey = getShortPubkey(walletProvider.address.text);
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
key: keyCopyAddress,
|
key: keyCopyAddress,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
@ -437,7 +460,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget manageMembership(BuildContext context) {
|
Widget manageMembership(BuildContext context) {
|
||||||
WalletOptionsProvider walletOptions =
|
final walletOptions =
|
||||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||||
return InkWell(
|
return InkWell(
|
||||||
key: keyManageMembership,
|
key: keyManageMembership,
|
||||||
|
@ -469,8 +492,8 @@ class WalletOptions extends StatelessWidget {
|
||||||
Widget setDefaultWalletWidget(
|
Widget setDefaultWalletWidget(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
WalletOptionsProvider walletProvider,
|
WalletOptionsProvider walletProvider,
|
||||||
MyWalletsProvider myWalletProvider,
|
final myWalletProvider,
|
||||||
WalletOptionsProvider walletOptions,
|
final walletOptions,
|
||||||
int currentChest) {
|
int currentChest) {
|
||||||
return Consumer<MyWalletsProvider>(builder: (context, myWalletProvider, _) {
|
return Consumer<MyWalletsProvider>(builder: (context, myWalletProvider, _) {
|
||||||
WalletData defaultWallet = myWalletProvider.getDefaultWallet();
|
WalletData defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
|
@ -511,10 +534,10 @@ class WalletOptions extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future setDefaultWallet(BuildContext context, int currentChest) async {
|
Future setDefaultWallet(BuildContext context, int currentChest) async {
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
WalletOptionsProvider walletOptions =
|
final walletOptions =
|
||||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||||
|
|
||||||
// WalletData defaultWallet = _myWalletProvider.getDefaultWallet()!;
|
// WalletData defaultWallet = _myWalletProvider.getDefaultWallet()!;
|
||||||
|
@ -527,8 +550,8 @@ class WalletOptions extends StatelessWidget {
|
||||||
|
|
||||||
Widget deleteWallet(BuildContext context,
|
Widget deleteWallet(BuildContext context,
|
||||||
WalletOptionsProvider walletProvider, int currentChest) {
|
WalletOptionsProvider walletProvider, int currentChest) {
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
|
|
||||||
final defaultWallet = myWalletProvider.getDefaultWallet();
|
final defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/chest_data.dart';
|
import 'package:gecko/models/chest_data.dart';
|
||||||
|
@ -23,19 +23,18 @@ import 'package:gecko/screens/myWallets/unlocking_wallet.dart';
|
||||||
import 'package:gecko/screens/myWallets/wallet_options.dart';
|
import 'package:gecko/screens/myWallets/wallet_options.dart';
|
||||||
import 'package:gecko/screens/wallet_view.dart';
|
import 'package:gecko/screens/wallet_view.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
|
||||||
class WalletsHome extends StatelessWidget {
|
class WalletsHome extends StatelessWidget {
|
||||||
const WalletsHome({Key? key}) : super(key: key);
|
const WalletsHome({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||||
MyWalletsProvider myWalletProvider =
|
|
||||||
Provider.of<MyWalletsProvider>(context);
|
|
||||||
HomeProvider homeProvider =
|
HomeProvider homeProvider =
|
||||||
Provider.of<HomeProvider>(context, listen: false);
|
Provider.of<HomeProvider>(context, listen: false);
|
||||||
|
|
||||||
final int currentChestNumber = myWalletProvider.getCurrentChest();
|
final currentChestNumber = myWalletProvider.getCurrentChest();
|
||||||
final ChestData currentChest = chestBox.get(currentChestNumber)!;
|
final ChestData currentChest = chestBox.get(currentChestNumber)!;
|
||||||
myWalletProvider.listWallets =
|
myWalletProvider.listWallets =
|
||||||
myWalletProvider.readAllWallets(currentChestNumber);
|
myWalletProvider.readAllWallets(currentChestNumber);
|
||||||
|
@ -90,7 +89,7 @@ class WalletsHome extends StatelessWidget {
|
||||||
final bool isSameAddress =
|
final bool isSameAddress =
|
||||||
myWalletProvider.dragAddress == myWalletProvider.lastFlyBy;
|
myWalletProvider.dragAddress == myWalletProvider.lastFlyBy;
|
||||||
|
|
||||||
final double screenWidth = MediaQuery.of(homeContext).size.width;
|
final screenWidth = MediaQuery.of(homeContext).size.width;
|
||||||
return Container(
|
return Container(
|
||||||
color: yellowC,
|
color: yellowC,
|
||||||
width: screenWidth,
|
width: screenWidth,
|
||||||
|
@ -109,8 +108,7 @@ class WalletsHome extends StatelessWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget chestOptions(
|
Widget chestOptions(BuildContext context, final myWalletProvider) {
|
||||||
BuildContext context, MyWalletsProvider myWalletProvider) {
|
|
||||||
return Column(children: [
|
return Column(children: [
|
||||||
const SizedBox(height: 50),
|
const SizedBox(height: 50),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -141,28 +139,39 @@ class WalletsHome extends StatelessWidget {
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
const SizedBox(height: 30),
|
const SizedBox(height: 30),
|
||||||
InkWell(
|
Row(
|
||||||
key: keyImportG1v1,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
onTap: () {
|
children: [
|
||||||
Navigator.push(
|
SvgPicture.asset(
|
||||||
context,
|
'assets/cesium_bw2.svg',
|
||||||
MaterialPageRoute(builder: (context) {
|
semanticsLabel: 'CS',
|
||||||
return const ImportG1v1();
|
height: 50,
|
||||||
}),
|
),
|
||||||
);
|
const SizedBox(width: 5),
|
||||||
},
|
InkWell(
|
||||||
child: SizedBox(
|
key: keyImportG1v1,
|
||||||
width: 400,
|
onTap: () {
|
||||||
height: 60,
|
Navigator.push(
|
||||||
child: Center(
|
context,
|
||||||
child: Text('importG1v1'.tr(),
|
MaterialPageRoute(builder: (context) {
|
||||||
style: TextStyle(
|
return const ImportG1v1();
|
||||||
fontSize: 22,
|
}),
|
||||||
color: Colors.blue[900],
|
);
|
||||||
fontWeight: FontWeight.w500))),
|
},
|
||||||
),
|
child: SizedBox(
|
||||||
|
width: 350,
|
||||||
|
height: 60,
|
||||||
|
child: Center(
|
||||||
|
child: Text('importG1v1'.tr(),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22,
|
||||||
|
color: Colors.blue[900],
|
||||||
|
fontWeight: FontWeight.w500))),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 5),
|
const SizedBox(height: 20),
|
||||||
InkWell(
|
InkWell(
|
||||||
key: keyChangeChest,
|
key: keyChangeChest,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
@ -189,12 +198,11 @@ class WalletsHome extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget myWalletsTiles(BuildContext context, int currentChestNumber) {
|
Widget myWalletsTiles(BuildContext context, int currentChestNumber) {
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||||
Provider.of<MyWalletsProvider>(context);
|
final walletOptions =
|
||||||
WalletOptionsProvider walletOptions =
|
|
||||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||||
final bool isWalletsExists = myWalletProvider.checkIfWalletExist();
|
final bool isWalletsExists = myWalletProvider.checkIfWalletExist();
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
if (!isWalletsExists) {
|
if (!isWalletsExists) {
|
||||||
return const Text('');
|
return const Text('');
|
||||||
|
@ -213,7 +221,7 @@ class WalletsHome extends StatelessWidget {
|
||||||
|
|
||||||
List listWallets = myWalletProvider.listWallets;
|
List listWallets = myWalletProvider.listWallets;
|
||||||
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
final double screenWidth = MediaQuery.of(context).size.width;
|
final screenWidth = MediaQuery.of(context).size.width;
|
||||||
int nTule = 2;
|
int nTule = 2;
|
||||||
|
|
||||||
if (screenWidth >= 900) {
|
if (screenWidth >= 900) {
|
||||||
|
@ -397,10 +405,9 @@ class WalletsHome extends StatelessWidget {
|
||||||
|
|
||||||
Widget nameBuilder(BuildContext context, WalletData repository,
|
Widget nameBuilder(BuildContext context, WalletData repository,
|
||||||
WalletData defaultWallet, int currentChestNumber) {
|
WalletData defaultWallet, int currentChestNumber) {
|
||||||
WalletOptionsProvider walletOptions =
|
final walletOptions =
|
||||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||||
DuniterIndexer duniterIndexer =
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
Provider.of<DuniterIndexer>(context, listen: false);
|
|
||||||
return ListTile(
|
return ListTile(
|
||||||
shape: const RoundedRectangleBorder(
|
shape: const RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.vertical(bottom: Radius.circular(12))),
|
borderRadius: BorderRadius.vertical(bottom: Radius.circular(12))),
|
||||||
|
@ -436,8 +443,7 @@ class WalletsHome extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget addNewDerivation(context) {
|
Widget addNewDerivation(context) {
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||||
Provider.of<MyWalletsProvider>(context);
|
|
||||||
|
|
||||||
String newDerivationName =
|
String newDerivationName =
|
||||||
'${'wallet'.tr()} ${myWalletProvider.listWallets.last.number! + 2}';
|
'${'wallet'.tr()} ${myWalletProvider.listWallets.last.number! + 2}';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
@ -19,15 +19,11 @@ class ContactsScreen extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
CesiumPlusProvider cesiumPlusProvider =
|
|
||||||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
|
||||||
WalletsProfilesProvider walletsProfilesClass =
|
WalletsProfilesProvider walletsProfilesClass =
|
||||||
Provider.of<WalletsProfilesProvider>(context, listen: true);
|
Provider.of<WalletsProfilesProvider>(context, listen: true);
|
||||||
HomeProvider homeProvider =
|
HomeProvider homeProvider =
|
||||||
Provider.of<HomeProvider>(context, listen: false);
|
Provider.of<HomeProvider>(context, listen: false);
|
||||||
DuniterIndexer duniterIndexer =
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
Provider.of<DuniterIndexer>(context, listen: false);
|
|
||||||
|
|
||||||
double avatarSize = 55;
|
double avatarSize = 55;
|
||||||
|
|
||||||
|
@ -74,8 +70,7 @@ class ContactsScreen extends StatelessWidget {
|
||||||
key: keySearchResult('keyID++'),
|
key: keySearchResult('keyID++'),
|
||||||
horizontalTitleGap: 40,
|
horizontalTitleGap: 40,
|
||||||
contentPadding: const EdgeInsets.all(5),
|
contentPadding: const EdgeInsets.all(5),
|
||||||
leading: cesiumPlusProvider
|
leading: defaultAvatar(avatarSize),
|
||||||
.defaultAvatar(avatarSize),
|
|
||||||
title: Row(children: <Widget>[
|
title: Row(children: <Widget>[
|
||||||
Text(getShortPubkey(g1Wallet.address),
|
Text(getShortPubkey(g1Wallet.address),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
@ -117,10 +112,10 @@ class ContactsScreen extends StatelessWidget {
|
||||||
g1Wallet.address;
|
g1Wallet.address;
|
||||||
return WalletViewScreen(
|
return WalletViewScreen(
|
||||||
address: g1Wallet.address,
|
address: g1Wallet.address,
|
||||||
username: g1WalletsBox
|
username:
|
||||||
.get(g1Wallet.address)
|
duniterIndexer.walletNameIndexer[
|
||||||
?.id
|
g1Wallet.address] ??
|
||||||
?.username,
|
'',
|
||||||
avatar: g1WalletsBox
|
avatar: g1WalletsBox
|
||||||
.get(g1Wallet.address)
|
.get(g1Wallet.address)
|
||||||
?.avatar,
|
?.avatar,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// ignore_for_file: file_names
|
// ignore_for_file: file_names
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/screens/common_elements.dart';
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
|
@ -11,7 +11,6 @@ class OnboardingStepOne extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
CommonElements common = CommonElements();
|
CommonElements common = CommonElements();
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
|
@ -29,13 +29,11 @@ class OnboardingStepTen extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final generateWalletProvider =
|
||||||
GenerateWalletsProvider generateWalletProvider =
|
|
||||||
Provider.of<GenerateWalletsProvider>(context);
|
Provider.of<GenerateWalletsProvider>(context);
|
||||||
WalletOptionsProvider walletOptions =
|
final walletOptions = Provider.of<WalletOptionsProvider>(context);
|
||||||
Provider.of<WalletOptionsProvider>(context);
|
|
||||||
CommonElements common = CommonElements();
|
CommonElements common = CommonElements();
|
||||||
final int pinLenght = generateWalletProvider.pin.text.length;
|
final pinLenght = generateWalletProvider.pin.text.length;
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
|
@ -132,20 +130,19 @@ class OnboardingStepTen extends StatelessWidget {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget pinForm(context, WalletOptionsProvider walletOptions, pinLenght,
|
Widget pinForm(
|
||||||
int walletNbr, int derivation) {
|
context, final walletOptions, pinLenght, int walletNbr, int derivation) {
|
||||||
// var _walletPin = '';
|
// var _walletPin = '';
|
||||||
// ignore: close_sinks
|
// ignore: close_sinks
|
||||||
StreamController<ErrorAnimationType> errorController =
|
StreamController<ErrorAnimationType> errorController =
|
||||||
StreamController<ErrorAnimationType>();
|
StreamController<ErrorAnimationType>();
|
||||||
TextEditingController enterPin = TextEditingController();
|
TextEditingController enterPin = TextEditingController();
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||||
Provider.of<MyWalletsProvider>(context);
|
final generateWalletProvider =
|
||||||
GenerateWalletsProvider generateWalletProvider =
|
|
||||||
Provider.of<GenerateWalletsProvider>(context);
|
Provider.of<GenerateWalletsProvider>(context);
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
final int currentChest = myWalletProvider.getCurrentChest();
|
final currentChest = myWalletProvider.getCurrentChest();
|
||||||
|
|
||||||
return Form(
|
return Form(
|
||||||
key: formKey,
|
key: formKey,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// ignore_for_file: file_names
|
// ignore_for_file: file_names
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
@ -12,7 +12,6 @@ class OnboardingStepEleven extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
CommonElements common = CommonElements();
|
CommonElements common = CommonElements();
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
@ -59,22 +58,8 @@ Widget finishButton(BuildContext context) {
|
||||||
backgroundColor: orangeC, // foreground
|
backgroundColor: orangeC, // foreground
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
//TODO: fix bad widget ancestor when pupUntil (multi_chest test failed)
|
|
||||||
|
|
||||||
// Navigator.popUntil(homeContext, ModalRoute.withName('/'));
|
|
||||||
// Navigator.of(homeContext, rootNavigator: true)
|
|
||||||
// .popUntil(ModalRoute.withName('/'));
|
|
||||||
// while (Navigator.of(homeContext).canPop()) {
|
|
||||||
// Navigator.of(homeContext).pop();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Navigator.pushNamed(homeContext, '/mywallets');
|
|
||||||
|
|
||||||
Navigator.pushNamedAndRemoveUntil(
|
Navigator.pushNamedAndRemoveUntil(
|
||||||
context, '/mywallets', (route) => route.isFirst);
|
context, '/mywallets', ModalRoute.withName('/'));
|
||||||
|
|
||||||
// Navigator.pushNamedAndRemoveUntil(
|
|
||||||
// homeContext, '/mywallets', ModalRoute.withName('/'));
|
|
||||||
},
|
},
|
||||||
child: Text("accessMyChest".tr(),
|
child: Text("accessMyChest".tr(),
|
||||||
style:
|
style:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// ignore_for_file: file_names
|
// ignore_for_file: file_names
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/screens/common_elements.dart';
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
|
@ -12,7 +12,6 @@ class OnboardingStepTwo extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
CommonElements common = CommonElements();
|
CommonElements common = CommonElements();
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// ignore_for_file: file_names
|
// ignore_for_file: file_names
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/screens/common_elements.dart';
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
|
@ -12,7 +12,6 @@ class OnboardingStepThree extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
CommonElements common = CommonElements();
|
CommonElements common = CommonElements();
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// ignore_for_file: file_names
|
// ignore_for_file: file_names
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/screens/common_elements.dart';
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
|
@ -12,7 +12,6 @@ class OnboardingStepFor extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
CommonElements common = CommonElements();
|
CommonElements common = CommonElements();
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
// ignore_for_file: file_names
|
// ignore_for_file: file_names
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:gecko/providers/generate_wallets.dart';
|
import 'package:gecko/providers/generate_wallets.dart';
|
||||||
import 'package:gecko/providers/my_wallets.dart';
|
import 'package:gecko/providers/my_wallets.dart';
|
||||||
|
import 'package:gecko/providers/wallets_profiles.dart';
|
||||||
import 'package:gecko/screens/common_elements.dart';
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
import 'package:gecko/screens/onBoarding/6.dart';
|
import 'package:gecko/screens/onBoarding/6.dart';
|
||||||
import 'package:printing/printing.dart';
|
import 'package:printing/printing.dart';
|
||||||
|
@ -29,8 +31,7 @@ class OnboardingStepFive extends StatefulWidget {
|
||||||
class _ChooseChestState extends State<OnboardingStepFive> {
|
class _ChooseChestState extends State<OnboardingStepFive> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final generateWalletProvider =
|
||||||
GenerateWalletsProvider generateWalletProvider =
|
|
||||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||||
|
|
||||||
final CommonElements common = CommonElements();
|
final CommonElements common = CommonElements();
|
||||||
|
@ -58,20 +59,57 @@ class _ChooseChestState extends State<OnboardingStepFive> {
|
||||||
SizedBox(height: 35 * ratio),
|
SizedBox(height: 35 * ratio),
|
||||||
sentanceArray(context),
|
sentanceArray(context),
|
||||||
SizedBox(height: 17 * ratio),
|
SizedBox(height: 17 * ratio),
|
||||||
GestureDetector(
|
Row(
|
||||||
onTap: () {
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
Navigator.push(
|
children: [
|
||||||
context,
|
// const SizedBox(height: 10),
|
||||||
MaterialPageRoute(builder: (context) {
|
GestureDetector(
|
||||||
return PrintWallet(
|
onTap: () {
|
||||||
generateWalletProvider.generatedMnemonic);
|
Navigator.push(
|
||||||
}),
|
context,
|
||||||
);
|
MaterialPageRoute(builder: (context) {
|
||||||
},
|
return PrintWallet(
|
||||||
child: Image.asset(
|
generateWalletProvider.generatedMnemonic);
|
||||||
'assets/printer.png',
|
}),
|
||||||
height: 42 * ratio,
|
);
|
||||||
),
|
},
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/printer.png',
|
||||||
|
height: 42 * ratio,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(
|
||||||
|
height: 40,
|
||||||
|
width: 120,
|
||||||
|
child: ElevatedButton(
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
foregroundColor: Colors.black,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
backgroundColor: orangeC,
|
||||||
|
elevation: 1, // foreground
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Clipboard.setData(ClipboardData(
|
||||||
|
text: generateWalletProvider.generatedMnemonic));
|
||||||
|
snackCopySeed(context);
|
||||||
|
},
|
||||||
|
child: Row(children: <Widget>[
|
||||||
|
Image.asset(
|
||||||
|
'assets/walletOptions/copy-white.png',
|
||||||
|
height: 25,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 7),
|
||||||
|
Text(
|
||||||
|
'copy'.tr(),
|
||||||
|
style: TextStyle(fontSize: 15, color: Colors.grey[50]),
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 40),
|
const SizedBox(height: 40),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
@ -112,7 +150,7 @@ class _ChooseChestState extends State<OnboardingStepFive> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget sentanceArray(BuildContext context) {
|
Widget sentanceArray(BuildContext context) {
|
||||||
GenerateWalletsProvider generateWalletProvider =
|
final generateWalletProvider =
|
||||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
|
@ -189,7 +227,7 @@ class PrintWallet extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
GenerateWalletsProvider generateWalletProvider =
|
final generateWalletProvider =
|
||||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
|
@ -222,9 +260,9 @@ class PrintWallet extends StatelessWidget {
|
||||||
|
|
||||||
Widget nextButton(
|
Widget nextButton(
|
||||||
BuildContext context, String text, bool isFast, bool skipIntro) {
|
BuildContext context, String text, bool isFast, bool skipIntro) {
|
||||||
GenerateWalletsProvider generateWalletProvider =
|
final generateWalletProvider =
|
||||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 380 * ratio,
|
width: 380 * ratio,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// ignore_for_file: must_be_immutable
|
// ignore_for_file: must_be_immutable
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
@ -24,8 +24,7 @@ class OnboardingStepSix extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final generateWalletProvider =
|
||||||
GenerateWalletsProvider generateWalletProvider =
|
|
||||||
Provider.of<GenerateWalletsProvider>(context, listen: true);
|
Provider.of<GenerateWalletsProvider>(context, listen: true);
|
||||||
|
|
||||||
CommonElements common = CommonElements();
|
CommonElements common = CommonElements();
|
||||||
|
@ -145,7 +144,7 @@ class OnboardingStepSix extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget nextButton(BuildContext context, String text, nextScreen, bool isFast) {
|
Widget nextButton(BuildContext context, String text, nextScreen, bool isFast) {
|
||||||
GenerateWalletsProvider generateWalletProvider =
|
final generateWalletProvider =
|
||||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||||
|
|
||||||
generateWalletProvider.isAskedWordValid = false;
|
generateWalletProvider.isAskedWordValid = false;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// ignore_for_file: file_names
|
// ignore_for_file: file_names
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/screens/common_elements.dart';
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
|
@ -13,7 +13,6 @@ class OnboardingStepSeven extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
CommonElements common = CommonElements();
|
CommonElements common = CommonElements();
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// ignore_for_file: file_names
|
// ignore_for_file: file_names
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/screens/common_elements.dart';
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
|
@ -13,7 +13,6 @@ class OnboardingStepEight extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
CommonElements common = CommonElements();
|
CommonElements common = CommonElements();
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// ignore_for_file: file_names
|
// ignore_for_file: file_names
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
@ -16,10 +16,9 @@ class OnboardingStepNine extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final generateWalletProvider =
|
||||||
GenerateWalletsProvider generateWalletProvider =
|
|
||||||
Provider.of<GenerateWalletsProvider>(context);
|
Provider.of<GenerateWalletsProvider>(context);
|
||||||
// MyWalletsProvider myWalletProvider =
|
// final myWalletProvider =
|
||||||
// Provider.of<MyWalletsProvider>(context);
|
// Provider.of<MyWalletsProvider>(context);
|
||||||
CommonElements common = CommonElements();
|
CommonElements common = CommonElements();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
// ignore_for_file: must_be_immutable
|
// ignore_for_file: must_be_immutable
|
||||||
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/providers/substrate_sdk.dart';
|
import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
|
@ -17,7 +16,6 @@ class QrCodeFullscreen extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
@ -16,11 +16,8 @@ class SearchScreen extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final searchProvider = Provider.of<SearchProvider>(context);
|
||||||
SearchProvider searchProvider = Provider.of<SearchProvider>(context);
|
final screenHeight = MediaQuery.of(context).size.height;
|
||||||
final double screenHeight = MediaQuery.of(context).size.height;
|
|
||||||
// HomeProvider _homeProvider =
|
|
||||||
// Provider.of<HomeProvider>(context, listen: false);
|
|
||||||
|
|
||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
onWillPop: () {
|
onWillPop: () {
|
||||||
|
@ -52,6 +49,17 @@ class SearchScreen extends StatelessWidget {
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 17),
|
padding: const EdgeInsets.symmetric(horizontal: 17),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
onSubmitted: searchProvider.searchController.text.length >= 2
|
||||||
|
? (_) {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(builder: (context) {
|
||||||
|
return const SearchResultScreen();
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
: (value) {},
|
||||||
|
textInputAction: TextInputAction.search,
|
||||||
key: keySearchField,
|
key: keySearchField,
|
||||||
controller: searchProvider.searchController,
|
controller: searchProvider.searchController,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
|
@ -90,8 +98,8 @@ class SearchScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const Spacer(flex: 1),
|
const Spacer(flex: 1),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 410,
|
width: 320,
|
||||||
height: 70,
|
height: 90,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
key: keyConfirmSearch,
|
key: keyConfirmSearch,
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
|
@ -110,8 +118,9 @@ class SearchScreen extends StatelessWidget {
|
||||||
: null,
|
: null,
|
||||||
child: Text(
|
child: Text(
|
||||||
'search'.tr(),
|
'search'.tr(),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 24, fontWeight: FontWeight.w600),
|
fontSize: 21, fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
@ -20,17 +20,12 @@ class SearchResultScreen extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final searchProvider = Provider.of<SearchProvider>(context, listen: false);
|
||||||
SearchProvider searchProvider =
|
|
||||||
Provider.of<SearchProvider>(context, listen: false);
|
|
||||||
CesiumPlusProvider cesiumPlusProvider =
|
|
||||||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
|
||||||
WalletsProfilesProvider walletsProfilesClass =
|
WalletsProfilesProvider walletsProfilesClass =
|
||||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||||
HomeProvider homeProvider =
|
HomeProvider homeProvider =
|
||||||
Provider.of<HomeProvider>(context, listen: false);
|
Provider.of<HomeProvider>(context, listen: false);
|
||||||
DuniterIndexer duniterIndexer =
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
Provider.of<DuniterIndexer>(context, listen: false);
|
|
||||||
|
|
||||||
double avatarSize = 55;
|
double avatarSize = 55;
|
||||||
|
|
||||||
|
@ -83,7 +78,6 @@ class SearchResultScreen extends StatelessWidget {
|
||||||
if (snapshot.data?.isEmpty ?? true) {
|
if (snapshot.data?.isEmpty ?? true) {
|
||||||
return duniterIndexer.searchIdentity(
|
return duniterIndexer.searchIdentity(
|
||||||
context, searchProvider.searchController.text);
|
context, searchProvider.searchController.text);
|
||||||
|
|
||||||
// const Text('Aucun résultat');
|
// const Text('Aucun résultat');
|
||||||
} else {
|
} else {
|
||||||
return Expanded(
|
return Expanded(
|
||||||
|
@ -97,8 +91,7 @@ class SearchResultScreen extends StatelessWidget {
|
||||||
key: keySearchResult(g1Wallet.address),
|
key: keySearchResult(g1Wallet.address),
|
||||||
horizontalTitleGap: 40,
|
horizontalTitleGap: 40,
|
||||||
contentPadding: const EdgeInsets.all(5),
|
contentPadding: const EdgeInsets.all(5),
|
||||||
leading: cesiumPlusProvider
|
leading: defaultAvatar(avatarSize),
|
||||||
.defaultAvatar(avatarSize),
|
|
||||||
title: Row(children: <Widget>[
|
title: Row(children: <Widget>[
|
||||||
Text(getShortPubkey(g1Wallet.address),
|
Text(getShortPubkey(g1Wallet.address),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
@ -144,10 +137,10 @@ class SearchResultScreen extends StatelessWidget {
|
||||||
g1Wallet.address;
|
g1Wallet.address;
|
||||||
return WalletViewScreen(
|
return WalletViewScreen(
|
||||||
address: g1Wallet.address,
|
address: g1Wallet.address,
|
||||||
username: g1WalletsBox
|
username: duniterIndexer
|
||||||
.get(g1Wallet.address)
|
.walletNameIndexer[
|
||||||
?.id
|
g1Wallet.address] ??
|
||||||
?.username,
|
'',
|
||||||
avatar: g1WalletsBox
|
avatar: g1WalletsBox
|
||||||
.get(g1Wallet.address)
|
.get(g1Wallet.address)
|
||||||
?.avatar,
|
?.avatar,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:gecko/providers/duniter_indexer.dart';
|
import 'package:gecko/providers/duniter_indexer.dart';
|
||||||
import 'package:gecko/providers/home.dart';
|
import 'package:gecko/providers/home.dart';
|
||||||
|
@ -18,8 +18,6 @@ class SettingsScreen extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
|
|
||||||
const double buttonHigh = 50;
|
const double buttonHigh = 50;
|
||||||
const double buttonWidth = 240;
|
const double buttonWidth = 240;
|
||||||
const double fontSize = 16;
|
const double fontSize = 16;
|
||||||
|
@ -110,7 +108,7 @@ class SettingsScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget duniterEndpointSelection(BuildContext context) {
|
Widget duniterEndpointSelection(BuildContext context) {
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
String? selectedDuniterEndpoint;
|
String? selectedDuniterEndpoint;
|
||||||
|
|
||||||
// List of items in our dropdown menu
|
// List of items in our dropdown menu
|
||||||
|
@ -271,8 +269,7 @@ class SettingsScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget indexerEndpointSelection(BuildContext context) {
|
Widget indexerEndpointSelection(BuildContext context) {
|
||||||
DuniterIndexer indexer =
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
Provider.of<DuniterIndexer>(context, listen: false);
|
|
||||||
|
|
||||||
String? selectedIndexerEndpoint;
|
String? selectedIndexerEndpoint;
|
||||||
if (configBox.containsKey('customIndexer')) {
|
if (configBox.containsKey('customIndexer')) {
|
||||||
|
@ -282,7 +279,7 @@ class SettingsScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedIndexerEndpoint == '') {
|
if (selectedIndexerEndpoint == '') {
|
||||||
selectedIndexerEndpoint = indexer.listIndexerEndpoints[0];
|
selectedIndexerEndpoint = duniterIndexer.listIndexerEndpoints[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
TextEditingController indexerEndpointController = TextEditingController(
|
TextEditingController indexerEndpointController = TextEditingController(
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
@ -7,8 +6,7 @@ class TemplateScreen extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
// final _homeProvider = Provider.of<HomeProvider>(context);
|
||||||
// HomeProvider _homeProvider = Provider.of<HomeProvider>(context);
|
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
@ -20,11 +20,10 @@ class TransactionInProgress extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
final sub = Provider.of<SubstrateSdk>(context, listen: true);
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: true);
|
final walletProfiles =
|
||||||
WalletsProfilesProvider walletViewProvider =
|
|
||||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
bool isValid = false;
|
bool isValid = false;
|
||||||
|
|
||||||
|
@ -35,11 +34,11 @@ class TransactionInProgress extends StatelessWidget {
|
||||||
|
|
||||||
// sub.spawnBlock();
|
// sub.spawnBlock();
|
||||||
|
|
||||||
log.d(walletViewProvider.address);
|
log.d(walletProfiles.address);
|
||||||
|
|
||||||
final from = fromAddress ?? myWalletProvider.getDefaultWallet().name!;
|
final from = fromAddress ?? myWalletProvider.getDefaultWallet().name!;
|
||||||
final to = toAddress ?? getShortPubkey(walletViewProvider.address);
|
final to = toAddress ?? getShortPubkey(walletProfiles.address);
|
||||||
final amount = walletViewProvider.payAmount.text;
|
final amount = walletProfiles.payAmount.text;
|
||||||
String actionName = '';
|
String actionName = '';
|
||||||
final bool isUdUnit = configBox.get('isUdUnit') ?? false;
|
final bool isUdUnit = configBox.get('isUdUnit') ?? false;
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,13 @@
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gecko/models/g1_wallets_list.dart';
|
import 'package:gecko/models/g1_wallets_list.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:gecko/providers/cesium_plus.dart';
|
import 'package:gecko/providers/cesium_plus.dart';
|
||||||
|
import 'package:gecko/providers/duniter_indexer.dart';
|
||||||
import 'package:gecko/providers/home.dart';
|
import 'package:gecko/providers/home.dart';
|
||||||
import 'package:gecko/providers/substrate_sdk.dart';
|
import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
import 'package:gecko/providers/wallet_options.dart';
|
import 'package:gecko/providers/wallet_options.dart';
|
||||||
|
@ -19,36 +21,38 @@ import 'package:gecko/screens/myWallets/choose_wallet.dart';
|
||||||
import 'package:gecko/screens/myWallets/unlocking_wallet.dart';
|
import 'package:gecko/screens/myWallets/unlocking_wallet.dart';
|
||||||
import 'package:gecko/screens/qrcode_fullscreen.dart';
|
import 'package:gecko/screens/qrcode_fullscreen.dart';
|
||||||
import 'package:gecko/screens/transaction_in_progress.dart';
|
import 'package:gecko/screens/transaction_in_progress.dart';
|
||||||
|
import 'package:gecko/widgets/header_profile.dart';
|
||||||
|
import 'package:gecko/widgets/page_route_no_transition.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:qr_flutter/qr_flutter.dart';
|
import 'package:qr_flutter/qr_flutter.dart';
|
||||||
|
|
||||||
class WalletViewScreen extends StatelessWidget {
|
class WalletViewScreen extends StatelessWidget {
|
||||||
const WalletViewScreen(
|
const WalletViewScreen(
|
||||||
{required this.address, this.username, this.avatar, Key? key})
|
{required this.address, required this.username, this.avatar, Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
final String address;
|
final String address;
|
||||||
final String? username;
|
final String username;
|
||||||
final Image? avatar;
|
final Image? avatar;
|
||||||
final double buttonSize = 100;
|
final double buttonSize = 100;
|
||||||
final double buttonFontSize = 18;
|
final double buttonFontSize = 18;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
|
||||||
WalletsProfilesProvider walletProfile =
|
WalletsProfilesProvider walletProfile =
|
||||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||||
CesiumPlusProvider cesiumPlusProvider =
|
|
||||||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
|
||||||
walletProfile.address = address;
|
walletProfile.address = address;
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
HomeProvider homeProvider =
|
HomeProvider homeProvider =
|
||||||
Provider.of<HomeProvider>(context, listen: false);
|
Provider.of<HomeProvider>(context, listen: false);
|
||||||
MyWalletsProvider myWalletProvider =
|
final myWalletProvider =
|
||||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
|
|
||||||
sub.setCurrentWallet(defaultWallet);
|
sub.setCurrentWallet(defaultWallet);
|
||||||
|
|
||||||
|
log.d('aaaaaaaaaaaaaaaaaaa: $username');
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
resizeToAvoidBottomInset: true,
|
resizeToAvoidBottomInset: true,
|
||||||
|
@ -100,15 +104,21 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
title: SizedBox(
|
title: SizedBox(
|
||||||
height: 22,
|
height: 22,
|
||||||
child: Text('seeAWallet'.tr()),
|
child: Text(duniterIndexer
|
||||||
),
|
.walletNameIndexer[walletProfile.address] ==
|
||||||
|
null
|
||||||
|
? 'seeAWallet'.tr()
|
||||||
|
: 'memberAccountOf'.tr(args: [
|
||||||
|
duniterIndexer.walletNameIndexer[walletProfile.address] ??
|
||||||
|
'?'
|
||||||
|
]))),
|
||||||
),
|
),
|
||||||
bottomNavigationBar: homeProvider.bottomAppBar(context),
|
bottomNavigationBar: homeProvider.bottomAppBar(context),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(children: <Widget>[
|
child: Column(children: <Widget>[
|
||||||
walletProfile.headerProfileView(context, address, username),
|
HeaderProfile(address: address, username: username),
|
||||||
SizedBox(height: isTall ? 10 : 0),
|
SizedBox(height: isTall ? 30 : 15),
|
||||||
Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
|
Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
|
||||||
Column(children: <Widget>[
|
Column(children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -128,11 +138,10 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (context) {
|
PageNoTransit(builder: (context) {
|
||||||
return ActivityScreen(
|
return ActivityScreen(
|
||||||
address: address,
|
address: address,
|
||||||
avatar:
|
avatar: defaultAvatar(50));
|
||||||
cesiumPlusProvider.defaultAvatar(50));
|
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
@ -149,6 +158,8 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
]),
|
]),
|
||||||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||||
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
|
final duniterIndexer =
|
||||||
|
Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
return FutureBuilder(
|
return FutureBuilder(
|
||||||
future: sub.certState(defaultWallet.address!, address),
|
future: sub.certState(defaultWallet.address!, address),
|
||||||
builder: (context, AsyncSnapshot<Map<String, int>> snapshot) {
|
builder: (context, AsyncSnapshot<Map<String, int>> snapshot) {
|
||||||
|
@ -162,8 +173,8 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
final Duration durationSeconds = Duration(
|
final Duration durationSeconds = Duration(
|
||||||
seconds: snapshot.data!['certDelay'] ??
|
seconds: snapshot.data!['certDelay'] ??
|
||||||
snapshot.data!['certRenewable']!);
|
snapshot.data!['certRenewable']!);
|
||||||
final int seconds = durationSeconds.inSeconds;
|
final seconds = durationSeconds.inSeconds;
|
||||||
final int minutes = durationSeconds.inMinutes;
|
final minutes = durationSeconds.inMinutes;
|
||||||
|
|
||||||
if (seconds <= 0) {
|
if (seconds <= 0) {
|
||||||
duration = 'seconds'.tr(args: ['0']);
|
duration = 'seconds'.tr(args: ['0']);
|
||||||
|
@ -172,8 +183,8 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
} else if (seconds <= 3600) {
|
} else if (seconds <= 3600) {
|
||||||
duration = 'minutes'.tr(args: [minutes.toString()]);
|
duration = 'minutes'.tr(args: [minutes.toString()]);
|
||||||
} else if (seconds <= 86400) {
|
} else if (seconds <= 86400) {
|
||||||
final int hours = durationSeconds.inHours;
|
final hours = durationSeconds.inHours;
|
||||||
final int minutesLeft = minutes - hours * 60;
|
final minutesLeft = minutes - hours * 60;
|
||||||
String showMinutes = '';
|
String showMinutes = '';
|
||||||
if (minutesLeft < 60) {}
|
if (minutesLeft < 60) {}
|
||||||
showMinutes =
|
showMinutes =
|
||||||
|
@ -181,11 +192,10 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
duration =
|
duration =
|
||||||
'hours'.tr(args: [hours.toString(), showMinutes]);
|
'hours'.tr(args: [hours.toString(), showMinutes]);
|
||||||
} else if (seconds <= 2592000) {
|
} else if (seconds <= 2592000) {
|
||||||
final int days = durationSeconds.inDays;
|
final days = durationSeconds.inDays;
|
||||||
duration = 'days'.tr(args: [days.toString()]);
|
duration = 'days'.tr(args: [days.toString()]);
|
||||||
} else {
|
} else {
|
||||||
final int months =
|
final months = (durationSeconds.inDays / 30).round();
|
||||||
(durationSeconds.inDays / 30).round();
|
|
||||||
duration = 'months'.tr(args: [months.toString()]);
|
duration = 'months'.tr(args: [months.toString()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -213,12 +223,18 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
'assets/gecko_certify.png')),
|
'assets/gecko_certify.png')),
|
||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final bool? result = await confirmPopup(
|
final bool? result =
|
||||||
context,
|
await confirmPopupCertification(
|
||||||
"areYouSureYouWantToCertify".tr(
|
context,
|
||||||
args: [
|
'areYouSureYouWantToCertify1'
|
||||||
getShortPubkey(address)
|
.tr(),
|
||||||
]));
|
duniterIndexer
|
||||||
|
.walletNameIndexer[
|
||||||
|
address] ??
|
||||||
|
"noIdentity".tr(),
|
||||||
|
'areYouSureYouWantToCertify2'
|
||||||
|
.tr(),
|
||||||
|
getShortPubkey(address));
|
||||||
|
|
||||||
if (result ?? false) {
|
if (result ?? false) {
|
||||||
String? pin;
|
String? pin;
|
||||||
|
@ -262,7 +278,9 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const SizedBox(height: 9),
|
const SizedBox(height: 9),
|
||||||
Text(
|
Text(
|
||||||
"certify".tr(),
|
toStatus == 0
|
||||||
|
? "certify".tr()
|
||||||
|
: "createIdentity".tr(),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: buttonFontSize,
|
fontSize: buttonFontSize,
|
||||||
|
@ -422,9 +440,7 @@ void paymentPopup(BuildContext context, String toAddress) {
|
||||||
log.d(pin);
|
log.d(pin);
|
||||||
if (pin != null || myWalletProvider.pinCode != '') {
|
if (pin != null || myWalletProvider.pinCode != '') {
|
||||||
// Payment workflow !
|
// Payment workflow !
|
||||||
WalletsProfilesProvider walletViewProvider =
|
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
|
||||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
|
||||||
final acc = sub.getCurrentWallet();
|
final acc = sub.getCurrentWallet();
|
||||||
log.d(
|
log.d(
|
||||||
"fromAddress: ${acc.address!},destAddress: $toAddress, amount: ${double.parse(walletViewProvider.payAmount.text)}, password: $pin");
|
"fromAddress: ${acc.address!},destAddress: $toAddress, amount: ${double.parse(walletViewProvider.payAmount.text)}, password: $pin");
|
||||||
|
|
|
@ -0,0 +1,87 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:gecko/globals.dart';
|
||||||
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
import 'package:gecko/providers/cesium_plus.dart';
|
||||||
|
import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
|
import 'package:gecko/screens/wallet_view.dart';
|
||||||
|
|
||||||
|
class CertTile extends StatelessWidget {
|
||||||
|
const CertTile({
|
||||||
|
Key? key,
|
||||||
|
required this.listCerts,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final List listCerts;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
int keyID = 0;
|
||||||
|
const double avatarSize = 200;
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
children: listCerts.map((repository) {
|
||||||
|
// log.d('bbbbbbbbbbbbbbbbbbbbbb: ' + repository.toString());
|
||||||
|
|
||||||
|
return Column(children: <Widget>[
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(right: 0),
|
||||||
|
child:
|
||||||
|
// Row(children: [Column(children: [],)],)
|
||||||
|
ListTile(
|
||||||
|
key: keyTransaction(keyID++),
|
||||||
|
contentPadding: const EdgeInsets.only(
|
||||||
|
left: 20, right: 30, top: 15, bottom: 15),
|
||||||
|
leading: ClipOval(
|
||||||
|
child: defaultAvatar(avatarSize),
|
||||||
|
),
|
||||||
|
title: Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 5),
|
||||||
|
child: Text(repository['name'],
|
||||||
|
style: const TextStyle(fontSize: 20)),
|
||||||
|
),
|
||||||
|
subtitle: RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
color: Colors.grey[700],
|
||||||
|
),
|
||||||
|
children: <TextSpan>[
|
||||||
|
TextSpan(
|
||||||
|
text: repository['date'],
|
||||||
|
),
|
||||||
|
if (repository[2] != '')
|
||||||
|
TextSpan(
|
||||||
|
text: ' · ',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
color: Colors.grey[550],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: getShortPubkey(repository['address']),
|
||||||
|
style: TextStyle(
|
||||||
|
fontStyle: FontStyle.italic,
|
||||||
|
color: Colors.grey[600],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
dense: false,
|
||||||
|
isThreeLine: false,
|
||||||
|
onTap: () {
|
||||||
|
Navigator.push(
|
||||||
|
homeContext,
|
||||||
|
MaterialPageRoute(builder: (context) {
|
||||||
|
return WalletViewScreen(
|
||||||
|
address: repository['address'],
|
||||||
|
username: repository['name'],
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
}).toList());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class CertsCounter extends StatelessWidget {
|
||||||
|
const CertsCounter({Key? key, required this.address, this.isSent = false})
|
||||||
|
: super(key: key);
|
||||||
|
final String address;
|
||||||
|
final bool isSent;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||||
|
return Text('(${sub.certsCounterCache[address]![isSent ? 1 : 0]})');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,104 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:gecko/globals.dart';
|
||||||
|
import 'package:gecko/models/queries_indexer.dart';
|
||||||
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
import 'package:gecko/widgets/cert_tile.dart';
|
||||||
|
import 'package:graphql_flutter/graphql_flutter.dart';
|
||||||
|
|
||||||
|
class CertsReceived extends StatelessWidget {
|
||||||
|
const CertsReceived({Key? key, required this.address}) : super(key: key);
|
||||||
|
final String address;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final screenHeight = MediaQuery.of(context).size.height;
|
||||||
|
final appBarHeight = AppBar().preferredSize.height;
|
||||||
|
log.d(appBarHeight);
|
||||||
|
final windowHeight = screenHeight - appBarHeight - 200;
|
||||||
|
|
||||||
|
final httpLink = HttpLink(
|
||||||
|
'$indexerEndpoint/v1/graphql',
|
||||||
|
);
|
||||||
|
|
||||||
|
final client = ValueNotifier(
|
||||||
|
GraphQLClient(
|
||||||
|
cache: GraphQLCache(store: HiveStore()),
|
||||||
|
link: httpLink,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return GraphQLProvider(
|
||||||
|
client: client,
|
||||||
|
child: Query(
|
||||||
|
options: QueryOptions(
|
||||||
|
document: gql(getCertsReceived),
|
||||||
|
variables: <String, dynamic>{
|
||||||
|
'address': address,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
builder: (QueryResult result, {fetchMore, refetch}) {
|
||||||
|
if (result.isLoading && result.data == null) {
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.hasException || result.data == null) {
|
||||||
|
log.e('Error Indexer: ${result.exception}');
|
||||||
|
return Column(children: <Widget>[
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Text(
|
||||||
|
"noNetworkNoHistory".tr(),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: const TextStyle(fontSize: 18),
|
||||||
|
)
|
||||||
|
]);
|
||||||
|
} else if (result.data?['certification']?.isEmpty) {
|
||||||
|
return Column(children: <Widget>[
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Text(
|
||||||
|
"noDataToDisplay".tr(),
|
||||||
|
style: const TextStyle(fontSize: 18),
|
||||||
|
)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
// Build history list
|
||||||
|
return SizedBox(
|
||||||
|
height: windowHeight,
|
||||||
|
child: ListView(
|
||||||
|
key: keyListTransactions,
|
||||||
|
children: <Widget>[certsView(result)],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget certsView(QueryResult result) {
|
||||||
|
List listCerts = [];
|
||||||
|
final List certsData = result.data!['certification'];
|
||||||
|
|
||||||
|
for (final cert in certsData) {
|
||||||
|
final String issuerAddress = cert['issuer']['pubkey'];
|
||||||
|
final String issuerName = cert['issuer']['name'];
|
||||||
|
final date = DateTime.parse(cert['created_at']);
|
||||||
|
final dp = DateTime(date.year, date.month, date.day);
|
||||||
|
final dateForm = '${dp.day}-${dp.month}-${dp.year}';
|
||||||
|
listCerts.add(
|
||||||
|
{'address': issuerAddress, 'name': issuerName, 'date': dateForm});
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.data == null
|
||||||
|
? Column(children: <Widget>[
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Text(
|
||||||
|
"noTransactionToDisplay".tr(),
|
||||||
|
style: const TextStyle(fontSize: 18),
|
||||||
|
)
|
||||||
|
])
|
||||||
|
: Column(children: <Widget>[
|
||||||
|
CertTile(listCerts: listCerts),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,105 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:gecko/globals.dart';
|
||||||
|
import 'package:gecko/models/queries_indexer.dart';
|
||||||
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
import 'package:gecko/widgets/cert_tile.dart';
|
||||||
|
import 'package:graphql_flutter/graphql_flutter.dart';
|
||||||
|
|
||||||
|
class CertsSent extends StatelessWidget {
|
||||||
|
const CertsSent({Key? key, required this.address}) : super(key: key);
|
||||||
|
final String address;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final screenHeight = MediaQuery.of(context).size.height;
|
||||||
|
final appBarHeight = AppBar().preferredSize.height;
|
||||||
|
log.d(appBarHeight);
|
||||||
|
final windowHeight = screenHeight - appBarHeight - 200;
|
||||||
|
|
||||||
|
final httpLink = HttpLink(
|
||||||
|
'$indexerEndpoint/v1/graphql',
|
||||||
|
);
|
||||||
|
|
||||||
|
final client = ValueNotifier(
|
||||||
|
GraphQLClient(
|
||||||
|
cache: GraphQLCache(store: HiveStore()),
|
||||||
|
link: httpLink,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return GraphQLProvider(
|
||||||
|
client: client,
|
||||||
|
child: Query(
|
||||||
|
options: QueryOptions(
|
||||||
|
document: gql(getCertsSent),
|
||||||
|
variables: <String, dynamic>{
|
||||||
|
'address': address,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
builder: (QueryResult result, {fetchMore, refetch}) {
|
||||||
|
if (result.isLoading && result.data == null) {
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result.hasException || result.data == null) {
|
||||||
|
log.e('Error Indexer: ${result.exception}');
|
||||||
|
return Column(children: <Widget>[
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Text(
|
||||||
|
"noNetworkNoHistory".tr(),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: const TextStyle(fontSize: 18),
|
||||||
|
)
|
||||||
|
]);
|
||||||
|
} else if (result.data?['certification']?.isEmpty) {
|
||||||
|
return Column(children: <Widget>[
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Text(
|
||||||
|
"noDataToDisplay".tr(),
|
||||||
|
style: const TextStyle(fontSize: 18),
|
||||||
|
)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
// Build history list
|
||||||
|
return SizedBox(
|
||||||
|
height: windowHeight,
|
||||||
|
child: ListView(
|
||||||
|
key: keyListTransactions,
|
||||||
|
children: <Widget>[certsView(result)],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget certsView(QueryResult result) {
|
||||||
|
List listCerts = [];
|
||||||
|
final List certsData = result.data!['certification'];
|
||||||
|
|
||||||
|
for (final cert in certsData) {
|
||||||
|
final String issuerAddress = cert['receiver']['pubkey'];
|
||||||
|
final String issuerName = cert['receiver']['name'];
|
||||||
|
final date = DateTime.parse(cert['created_at']);
|
||||||
|
final dp = DateTime(date.year, date.month, date.day);
|
||||||
|
final dateForm = '${dp.day}-${dp.month}-${dp.year}';
|
||||||
|
|
||||||
|
listCerts.add(
|
||||||
|
{'address': issuerAddress, 'name': issuerName, 'date': dateForm});
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.data == null
|
||||||
|
? Column(children: <Widget>[
|
||||||
|
const SizedBox(height: 50),
|
||||||
|
Text(
|
||||||
|
"noTransactionToDisplay".tr(),
|
||||||
|
style: const TextStyle(fontSize: 18),
|
||||||
|
)
|
||||||
|
])
|
||||||
|
: Column(children: <Widget>[
|
||||||
|
CertTile(listCerts: listCerts),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,140 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:gecko/globals.dart';
|
||||||
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
import 'package:gecko/providers/cesium_plus.dart';
|
||||||
|
import 'package:gecko/providers/duniter_indexer.dart';
|
||||||
|
import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
|
import 'package:gecko/providers/wallet_options.dart';
|
||||||
|
import 'package:gecko/providers/wallets_profiles.dart';
|
||||||
|
import 'package:gecko/screens/certifications.dart';
|
||||||
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
|
import 'package:gecko/widgets/page_route_no_transition.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
class HeaderProfile extends StatelessWidget {
|
||||||
|
const HeaderProfile({
|
||||||
|
Key? key,
|
||||||
|
required this.address,
|
||||||
|
required this.username,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final String address;
|
||||||
|
final String? username;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
const double avatarSize = 140;
|
||||||
|
|
||||||
|
final walletOptions =
|
||||||
|
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||||
|
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||||
|
|
||||||
|
return Stack(children: <Widget>[
|
||||||
|
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||||
|
// sub.getBlockchainStart();
|
||||||
|
bool isAccountExist = balanceCache[address] != 0;
|
||||||
|
return Container(
|
||||||
|
height: 180,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
colors: [
|
||||||
|
isAccountExist ? yellowC : Colors.grey[400]!,
|
||||||
|
isAccountExist ? const Color(0xFFE7811A) : Colors.grey[600]!,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 30, right: 40),
|
||||||
|
child: Row(children: <Widget>[
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
height: 10,
|
||||||
|
color: yellowC, // Colors.grey[400],
|
||||||
|
),
|
||||||
|
Row(children: [
|
||||||
|
GestureDetector(
|
||||||
|
key: keyCopyAddress,
|
||||||
|
onTap: () {
|
||||||
|
Clipboard.setData(ClipboardData(text: address));
|
||||||
|
snackCopyKey(context);
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
getShortPubkey(address),
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 30,
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
const SizedBox(height: 25),
|
||||||
|
balance(context, address, 22),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
|
||||||
|
InkWell(
|
||||||
|
onTap: () => duniterIndexer.walletNameIndexer[address] != null
|
||||||
|
? {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
PageNoTransit(builder: (context) {
|
||||||
|
return CertificationsScreen(
|
||||||
|
address: address,
|
||||||
|
username: duniterIndexer
|
||||||
|
.walletNameIndexer[address]!);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
}
|
||||||
|
: null,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
walletOptions.idtyStatus(context, address,
|
||||||
|
isOwner: false, color: Colors.black),
|
||||||
|
getCerts(context, address, 14)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// if (username == null &&
|
||||||
|
// g1WalletsBox.get(address)?.username != null)
|
||||||
|
// SizedBox(
|
||||||
|
// width: 230,
|
||||||
|
// child: Text(
|
||||||
|
// g1WalletsBox.get(address)?.username ?? '',
|
||||||
|
// style: const TextStyle(
|
||||||
|
// fontSize: 27,
|
||||||
|
// color: Color(0xff814C00),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// if (username != null)
|
||||||
|
// SizedBox(
|
||||||
|
// width: 230,
|
||||||
|
// child: Text(
|
||||||
|
// username,
|
||||||
|
// style: const TextStyle(
|
||||||
|
// fontSize: 27,
|
||||||
|
// color: Color(0xff814C00),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 55),
|
||||||
|
]),
|
||||||
|
const Spacer(),
|
||||||
|
Column(children: <Widget>[
|
||||||
|
ClipOval(
|
||||||
|
child: defaultAvatar(avatarSize),
|
||||||
|
),
|
||||||
|
// const SizedBox(height: 25),
|
||||||
|
]),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
CommonElements().offlineInfo(context),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class PageNoTransit extends MaterialPageRoute {
|
||||||
|
PageNoTransit({builder}) : super(builder: builder);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Duration get transitionDuration => const Duration(milliseconds: 0);
|
||||||
|
}
|
218
pubspec.lock
218
pubspec.lock
|
@ -8,6 +8,13 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "50.0.0"
|
version: "50.0.0"
|
||||||
|
accordion:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: accordion
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.5.1"
|
||||||
analyzer:
|
analyzer:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -50,13 +57,6 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.9.0"
|
version: "2.9.0"
|
||||||
auth_header:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: auth_header
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.1"
|
|
||||||
barcode:
|
barcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -71,6 +71,13 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.2.1"
|
version: "4.2.1"
|
||||||
|
bip32:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: bip32
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.0"
|
||||||
bip32_ed25519:
|
bip32_ed25519:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -78,6 +85,13 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.2"
|
version: "0.2.2"
|
||||||
|
bip39:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: bip39
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.6"
|
||||||
bip39_multi_nullsafety:
|
bip39_multi_nullsafety:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -92,6 +106,13 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.1.0"
|
||||||
|
bs58check:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: bs58check
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.2"
|
||||||
bubble:
|
bubble:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -273,7 +294,7 @@ packages:
|
||||||
name: dart_code_metrics
|
name: dart_code_metrics
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.1"
|
version: "5.1.0"
|
||||||
dart_style:
|
dart_style:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -288,6 +309,13 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.8"
|
version: "0.7.8"
|
||||||
|
decimal:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: decimal
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.3.1"
|
||||||
dio:
|
dio:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -323,6 +351,20 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.2"
|
version: "0.0.2"
|
||||||
|
eip55:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: eip55
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.2"
|
||||||
|
ethers:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: ethers
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.0.1+3"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -331,7 +373,7 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.3.1"
|
||||||
fast_base58:
|
fast_base58:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: fast_base58
|
name: fast_base58
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
|
@ -395,7 +437,7 @@ packages:
|
||||||
name: flutter_inappwebview
|
name: flutter_inappwebview
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.3.2"
|
version: "5.7.2+2"
|
||||||
flutter_lints:
|
flutter_lints:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -422,6 +464,13 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.7"
|
version: "2.0.7"
|
||||||
|
flutter_svg:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_svg
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.6"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -515,7 +564,7 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.2+1"
|
version: "0.2.2+1"
|
||||||
graphql:
|
graphql:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: graphql
|
name: graphql
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
|
@ -584,13 +633,6 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.2"
|
version: "4.0.2"
|
||||||
http_server:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: http_server
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "1.0.0"
|
|
||||||
icons_launcher:
|
icons_launcher:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
|
@ -680,27 +722,6 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.3"
|
version: "1.0.3"
|
||||||
jaguar:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: jaguar
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "3.1.3"
|
|
||||||
jaguar_common:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: jaguar_common
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.0"
|
|
||||||
jaguar_flutter_asset:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: jaguar_flutter_asset
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.0"
|
|
||||||
jdenticon_dart:
|
jdenticon_dart:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -722,6 +743,13 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.7.0"
|
version: "4.7.0"
|
||||||
|
json_rpc_2:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: json_rpc_2
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.2"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -777,7 +805,7 @@ packages:
|
||||||
name: mime
|
name: mime
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.2"
|
version: "1.0.3"
|
||||||
mobx:
|
mobx:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -834,6 +862,13 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.2"
|
version: "1.8.2"
|
||||||
|
path_drawing:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_drawing
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.1"
|
||||||
path_parsing:
|
path_parsing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -890,13 +925,6 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.3"
|
version: "2.1.3"
|
||||||
path_tree:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: path_tree
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.0"
|
|
||||||
pdf:
|
pdf:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -954,7 +982,7 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.4.0"
|
version: "7.4.0"
|
||||||
pinenacl:
|
pinenacl:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: pinenacl
|
name: pinenacl
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
|
@ -985,11 +1013,11 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: gecko-unwrapbytes
|
ref: d45eb8d787d625331e6425df5cec9c5d33b30d35
|
||||||
resolved-ref: b019cc2a6e77b6989f94b1bef8259298410cd82a
|
resolved-ref: d45eb8d787d625331e6425df5cec9c5d33b30d35
|
||||||
url: "https://github.com/poka-IT/sdk.git"
|
url: "https://github.com/poka-IT/sdk.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.4.8"
|
version: "0.5.0"
|
||||||
pool:
|
pool:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1062,6 +1090,13 @@ packages:
|
||||||
url: "https://github.com/insinfo/qr.flutter.git"
|
url: "https://github.com/insinfo/qr.flutter.git"
|
||||||
source: git
|
source: git
|
||||||
version: "4.0.0"
|
version: "4.0.0"
|
||||||
|
rational:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: rational
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.2.1"
|
||||||
responsive_framework:
|
responsive_framework:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -1076,20 +1111,34 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.27.7"
|
version: "0.27.7"
|
||||||
|
scroll_to_index:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: scroll_to_index
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.1"
|
||||||
|
sec:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: sec
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.1"
|
||||||
sentry:
|
sentry:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: sentry
|
name: sentry
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.16.1"
|
version: "6.17.0"
|
||||||
sentry_flutter:
|
sentry_flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: sentry_flutter
|
name: sentry_flutter
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.16.1"
|
version: "6.17.0"
|
||||||
shared_preferences:
|
shared_preferences:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -1256,6 +1305,62 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.0"
|
version: "0.2.0"
|
||||||
|
url_launcher:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "6.1.7"
|
||||||
|
url_launcher_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_android
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "6.0.22"
|
||||||
|
url_launcher_ios:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_ios
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "6.0.17"
|
||||||
|
url_launcher_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_linux
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.1"
|
||||||
|
url_launcher_macos:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_macos
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.1"
|
||||||
|
url_launcher_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_platform_interface
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
|
url_launcher_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_web
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.13"
|
||||||
|
url_launcher_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: url_launcher_windows
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.1"
|
||||||
uuid:
|
uuid:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1284,6 +1389,13 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.2"
|
version: "1.0.2"
|
||||||
|
web3dart:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: web3dart
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.5.1"
|
||||||
web_socket_channel:
|
web_socket_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
12
pubspec.yaml
12
pubspec.yaml
|
@ -5,7 +5,7 @@ description: Pay with G1.
|
||||||
# pub.dev using `pub publish`. This is preferred for private packages.
|
# pub.dev using `pub publish`. This is preferred for private packages.
|
||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
|
|
||||||
version: 0.0.12+33
|
version: 0.0.14+44
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
@ -18,7 +18,7 @@ dependencies:
|
||||||
bubble: ^1.2.1
|
bubble: ^1.2.1
|
||||||
carousel_slider: ^4.0.0
|
carousel_slider: ^4.0.0
|
||||||
flutter_lints: ^2.0.1
|
flutter_lints: ^2.0.1
|
||||||
graphql_flutter: ^5.1.1-beta.3
|
graphql_flutter: ^5.1.1-beta.4
|
||||||
hive_flutter: ^1.1.0
|
hive_flutter: ^1.1.0
|
||||||
image_picker: ^0.8.4
|
image_picker: ^0.8.4
|
||||||
jdenticon_dart: ^2.0.0
|
jdenticon_dart: ^2.0.0
|
||||||
|
@ -48,7 +48,8 @@ dependencies:
|
||||||
# ref: develop
|
# ref: develop
|
||||||
url: https://github.com/poka-IT/sdk.git
|
url: https://github.com/poka-IT/sdk.git
|
||||||
# ref: gecko-old
|
# ref: gecko-old
|
||||||
ref: gecko-unwrapbytes
|
# ref: ec61ebab45287315fa1d7e84830a01d6e23891ae
|
||||||
|
ref: d45eb8d787d625331e6425df5cec9c5d33b30d35
|
||||||
dots_indicator: ^2.1.0
|
dots_indicator: ^2.1.0
|
||||||
connectivity_plus: ^2.3.3
|
connectivity_plus: ^2.3.3
|
||||||
image_cropper: ^3.0.0
|
image_cropper: ^3.0.0
|
||||||
|
@ -57,6 +58,11 @@ dependencies:
|
||||||
pointycastle: ^3.6.1
|
pointycastle: ^3.6.1
|
||||||
hex: ^0.2.0
|
hex: ^0.2.0
|
||||||
flutter_dotenv: ^5.0.2
|
flutter_dotenv: ^5.0.2
|
||||||
|
accordion: ^2.5.1
|
||||||
|
flutter_svg: ^1.1.6
|
||||||
|
pinenacl: ^0.3.3
|
||||||
|
fast_base58: ^0.2.1
|
||||||
|
graphql: ^5.1.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
# flutter_launcher_icons: ^0.9.2
|
# flutter_launcher_icons: ^0.9.2
|
||||||
|
|
Loading…
Reference in New Issue