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
|
||||
macos/
|
||||
windows/
|
||||
windows/
|
||||
scripts/pushGecko
|
|
@ -7,7 +7,7 @@ stages:
|
|||
.env:
|
||||
image: axiomteam/gecko-ci:v0.0.11
|
||||
tags:
|
||||
- redshift
|
||||
- docker
|
||||
|
||||
format:
|
||||
extends: .env
|
||||
|
@ -28,8 +28,6 @@ build_and_test:
|
|||
- if: $CI_COMMIT_TAG || $CI_MERGE_REQUEST_ID
|
||||
- when: manual
|
||||
stage: build_and_test
|
||||
tags:
|
||||
- redshift
|
||||
script:
|
||||
- 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 \"{}\"?",
|
||||
"areYouSureForgetAllChests": "Are you sure you want to forget all your chests?",
|
||||
"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",
|
||||
"no": "No",
|
||||
"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 {}",
|
||||
"days": "{} days",
|
||||
"months": "{} months",
|
||||
"certify": "Certify",
|
||||
"certify": "Certify this\nidentity",
|
||||
"from": "From:",
|
||||
"to": "To:",
|
||||
"amount": "Amount:",
|
||||
|
@ -168,7 +169,7 @@
|
|||
"deleteThisWallet": "Delete this wallet",
|
||||
"cancel": "Cancel",
|
||||
"inBlockchainResult": "In {} blockchain",
|
||||
"search": "Search",
|
||||
"search": "Search an identity\nor an address",
|
||||
"currencyNode": "{} node :",
|
||||
"contactsManagementWithNbr": "My contacts ({})",
|
||||
"contactsManagement": "My contacts",
|
||||
|
@ -195,5 +196,11 @@
|
|||
"youCannotRevokeThisIdentity": "You cannot revoke this identity while\nit is member of the blacksmiths web",
|
||||
"showUdAmounts": "Show amounts in 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",
|
||||
"manageWallets": "Gestionar\nbilleteras",
|
||||
"searchWallet": "Buscar\nmonedero",
|
||||
"manageWallets": "Gestionar\nmonederos",
|
||||
"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...",
|
||||
"noDuniterEndointAvailable": "No hay servidor disponible...",
|
||||
"connectionPending": "Conexión pendiente...",
|
||||
"noLizard": "no hay lagarto ;-)",
|
||||
"loading": "Cargando...",
|
||||
"forgot_password.png": "forgot_password_en.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.",
|
||||
"forgot_password.png": "forgot_password_es.png",
|
||||
"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",
|
||||
"createWallet": "Crear una billetera",
|
||||
"restoreWallet": "Restaurar mis billeteras",
|
||||
"createWallet": "Crear un monedero",
|
||||
"restoreWallet": "Restaurar mis monederos",
|
||||
"parameters": "Parámetros",
|
||||
"chooseAnotherMnemonic": "Choose an other\nmnemonic sentence",
|
||||
"iNotedMyMnemonic": "He escrito mi frase",
|
||||
"printMyMnemonic": "Print my mnemonic sentence",
|
||||
"manageChest": "Configure this chest",
|
||||
"changeChest": "Change chest",
|
||||
"geckoChest": "Ğecko chest",
|
||||
"toUnlockEnterPassword": "To unlock your safe, enter your secret code, away from prying lizards:",
|
||||
"rememberPassword": "Keep this code in memory for 15 minutes",
|
||||
"myRootWallet": "Mi billetera principal",
|
||||
"currentWallet": "My current chest",
|
||||
"wallet": "Billetera",
|
||||
"displayMnemonic": "Display my mnemonic sentence",
|
||||
"chooseAnotherMnemonic": "Elige otra frase de restauración",
|
||||
"iNotedMyMnemonic": "He anotado mi frase de restauración",
|
||||
"printMyMnemonic": "Imprimir mi frase de restauración",
|
||||
"manageChest": "Configurar este cofre",
|
||||
"changeChest": "Cambiar de cofre",
|
||||
"GeckoChest": "Cofre de Ğecko",
|
||||
"toUnlockEnterPassword": "Para desbloquear tu cofre, introduce tu contraseña, lejos de lagartijas curiosas:",
|
||||
"rememberPassword": "Mantener en memoria mi contraseña durante 15 minutos",
|
||||
"myRootWallet": "Mi monedero principal",
|
||||
"currentWallet": "Mi cofre actual",
|
||||
"wallet": "monedero",
|
||||
"displayMnemonic": "Mostrar mi frase de restauración",
|
||||
"changePassword": "Cambiar mi contraseña",
|
||||
"createDerivation": "Create a new derivation",
|
||||
"createCustomDerivation": "Create a new custom derivation",
|
||||
"deleteChest": "Delete this chest",
|
||||
"openThisChest": "Open this chest",
|
||||
"createChest": "Create a new chest",
|
||||
"importChest": "Import a chest",
|
||||
"selectMyChest": "Select my chest",
|
||||
"accessMyChest": "Access my chest",
|
||||
"manageMembership": "Manage my membership",
|
||||
"chooseThisWallet": "Elegir esta billetera",
|
||||
"thisWalletIsDefault": "This wallet is the default one",
|
||||
"defineWalletAsDefault": "Define this as the default one",
|
||||
"displayActivity": "Display activity",
|
||||
"displayNActivity": "Display\nactivity",
|
||||
"createDerivation": "Crear una nueva derivación",
|
||||
"createCustomDerivation": "Crear una nueva derivación personalizada",
|
||||
"deleteChest": "Borrar este cofre",
|
||||
"openThisChest": "Abrir este cofre",
|
||||
"createChest": "Crear un nuevo cofre",
|
||||
"importChest": "Importar un cofre",
|
||||
"selectMyChest": "Seleccionar mi cofre",
|
||||
"accessMyChest": "Acceder a mi cofre",
|
||||
"manageMembership": "Administrar mi afiliación",
|
||||
"chooseThisWallet": "Elegir este monedero",
|
||||
"thisWalletIsDefault": "Monedero definido por defecto",
|
||||
"defineWalletAsDefault": "Definir este monedero como por defecto",
|
||||
"displayActivity": "Visualizar actividad",
|
||||
"displayNActivity": "Visualizar\nactividad",
|
||||
"memberValidated": "Miembro validado!",
|
||||
"copyAddress": "Copiar\ndirección",
|
||||
"copyAddress": "Copiar\nla dirección",
|
||||
"copy": "Copiar",
|
||||
"thisAddressHasBeenCopiedToClipboard": "Esta dirección se ha copiado al cortapapeles",
|
||||
"chooseWalletName": "Choose a new name\nfor your wallet:",
|
||||
"choosePassword": "Choose a random password:",
|
||||
"chooseDerivation": "Choose a derivation:",
|
||||
"thisAddressHasBeenCopiedToClipboard": "Esta dirección se ha copiado al portapapeles",
|
||||
"chooseWalletName": "Elige un nuevo nombre\npara tu monedero:",
|
||||
"choosePassword": "Elige una contraseña aleatoria:",
|
||||
"chooseDerivation": "Elige una derivación:",
|
||||
"validate": "Validar",
|
||||
"confirm": "Confirmar",
|
||||
"confirmPayment": "Confirmar pago",
|
||||
"geckoGenerateYourWalletFromMnemonic": "Ğecko builds your wallet from a **restoration sentence**. It is a bit like the blueprint that builds your wallet.",
|
||||
"keepThisMnemonicSecure": "Keep this sentence carefully, because without it Ğecko will not be able to rebuild your wallets the day you change your phone.",
|
||||
"geckoGeneratedYourMnemonicKeepItSecret": "Ğecko generated your mnemonic successfully! Keep it secret, because anyone who knows it can access all your wallets.",
|
||||
"newWallet": "New Wallet",
|
||||
"itsTimeToUseAPenAndPaper": "It's time to take a **pen and paper** in order to write down your mnemonic.",
|
||||
"yourMnemonic": "Your mnemonic",
|
||||
"gecko_also_can_forget.png": "gecko_also_can_forget_en.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:",
|
||||
"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.",
|
||||
"myPassword": "My password",
|
||||
"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.",
|
||||
"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.",
|
||||
"GeckoGenerateYourWalletFromMnemonic": "Ğecko construye tu monedero a partir de una **frase de restauración**. Es como unos planos que permiten restaurar tu monedero.",
|
||||
"keepThisMnemonicSecure": "Guarda esta frase con cuidado, porque sin ella Ğecko no podrá restaurar tus monederos el día que cambies de dispositivo.",
|
||||
"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": "Nuevo monedero",
|
||||
"itsTimeToUseAPenAndPaper": "Es el momento de coger un **papel y un bolígrafo** para anotar tu frase de restauración.",
|
||||
"yourMnemonic": "tu frase de restauración",
|
||||
"gecko_also_can_forget.png": "gecko_also_can_forget_es.png",
|
||||
"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": "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": "Mi contraseña",
|
||||
"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": "¡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",
|
||||
"iNotedMyPassword": "I noted my password",
|
||||
"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.",
|
||||
"yourChestAndWalletWereCreatedSuccessfully": "Super!\n\nYour chest and your first portfolio have been created with great success.\n\nCongratulations!",
|
||||
"allGood": "That's all good!",
|
||||
"areYouSureToDeleteWallet": "Are you sure you want to delete the chest \"{}\"?",
|
||||
"areYouSureForgetAllChests": "Are you sure you want to forget all your chests?",
|
||||
"areYouSureToForgetWallet": "Are you sure you wan to forget the wallet \"{}\"?",
|
||||
"areYouSureYouWantToCertify": "Are you sure you want to certify the address:\n\n{}",
|
||||
"yes": "Si",
|
||||
"iNotedMyPassword": "He anotado mi contraseña",
|
||||
"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": "¡Genial!\n\nTu cofre y tu primer monedero han sido creados con éxito.\n\n¡Felicidades!",
|
||||
"allGood": "¡Todo bien!",
|
||||
"areYouSureToDeleteWallet": "¿Seguro de que quieres eliminar el cofre \"{}\"?",
|
||||
"areYouSureForgetAllChests": "¿Seguro de que quieres olvidar todos tus cofres?",
|
||||
"areYouSureToForgetWallet": "¿Seguro de que quieres olvidar el monedero \"{}\"?",
|
||||
"areYouSureYouWantToCertify": "¿Seguro de que quiere certificar a la dirección\n\n{}?",
|
||||
"areYouSureYouWantToCertify1": "¿Seguro de que quiere certificar a la identidad :",
|
||||
"areYouSureYouWantToCertify2": " a la dirección :",
|
||||
"yes": "Sí",
|
||||
"no": "No",
|
||||
"keepYourMnemonicSecret": "Try to keep this phrase a secret, as it allows anyone who knows it to access all your wallets.",
|
||||
"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.",
|
||||
"myMnemonic": "My mnemonic",
|
||||
"close": "Close",
|
||||
"toRestoreEnterMnemonic": "To restore your Gecko wallets, enter in the fields below the 12 words that constitute your restoration phrase:",
|
||||
"pasteFromClipboard": "Paste from\nclipboard",
|
||||
"restoreAChest": "Restore a chest",
|
||||
"restoreThisChest": "Restore this chest",
|
||||
"keepYourMnemonicSecret": "Intenta mantener esta frase de restauración en secreto, ya que permite a cualquiera que la conozca acceder a todas tus monederos.",
|
||||
"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": "Mi frase de restauración",
|
||||
"close": "Cerrar",
|
||||
"toRestoreEnterMnemonic": "Para restaurar tus monederos Ğecko, introduce las 12 palabras que componen tu frase de restauración en los cuadros de abajo:",
|
||||
"pasteFromClipboard": "Pegar del\nportapapeles",
|
||||
"restoreAChest": "Restaurar un cofre",
|
||||
"restoreThisChest": "Restaurar este cofre",
|
||||
"continue": "Continuar",
|
||||
"itsTheGoodWord": "It's the good word!",
|
||||
"nthMnemonicWord": "word of your mnemonic",
|
||||
"itsTheGoodWord": "¡Es la palabra correcta!",
|
||||
"nthMnemonicWord": "palabra de tu mnemotecnia",
|
||||
"1th": "Primera",
|
||||
"2th": "Segunda",
|
||||
"3th": "Tercera",
|
||||
|
@ -98,17 +100,17 @@
|
|||
"11th": "Undécima",
|
||||
"12th": "Duodécima",
|
||||
"yourPasswordLengthIsX": "La longitud de tu contraseña es {}",
|
||||
"noIdentity": "No identity",
|
||||
"noIdentity": "Ninguna identidad",
|
||||
"identityCreated": "Identidad creada",
|
||||
"identityConfirmed": "Identidad confirmada",
|
||||
"identityExpired": "Identitdad caducada",
|
||||
"identityExpired": "Identidad caducada",
|
||||
"confirmYourIdentity": "Confirma tu identidad",
|
||||
"noDuniterNodeAvailableTryLater": "No Duniter node available, please try again later",
|
||||
"youAreConnectedToNode": "You are connected to node",
|
||||
"noDuniterNodeAvailableTryLater": "No hay ningún nodo Duniter disponible, por favor, inténtalo más tarde",
|
||||
"youAreConnectedToNode": "Estás conectado al nodo",
|
||||
"accountActivity": "Actividad de la cuenta",
|
||||
"noNetworkNoHistory": "Network state does not allow\nto display account history",
|
||||
"noDataToDisplay": "No data to be displayed.",
|
||||
"noTransactionToDisplay": "No transaction to display",
|
||||
"noNetworkNoHistory": "El estado de la red no permite\nmostrar el historial de la cuenta",
|
||||
"noDataToDisplay": "No hay datos que mostrar.",
|
||||
"noTransactionToDisplay": "No hay transacciónes a mostrar",
|
||||
"month1": "Enero",
|
||||
"month2": "Febrero",
|
||||
"month3": "Marzo",
|
||||
|
@ -124,76 +126,82 @@
|
|||
"today": "Hoy",
|
||||
"yesterday": "Ayer",
|
||||
"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.",
|
||||
"notConnectedToInternet": "No estas conectado a internet",
|
||||
"researchResults": "Results of your research",
|
||||
"resultsFor": "Results for ",
|
||||
"forgetAllMyChests": "Forget all my chests",
|
||||
"transaction": "Transaccion",
|
||||
"certification": "Certificacion",
|
||||
"identityConfirm": "Identity confirmation",
|
||||
"revokeAdhesion": "Adhesion revocation",
|
||||
"strangeTransaction": "Strange transaction",
|
||||
"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 estás conectado a Internet",
|
||||
"researchResults": "Resultados de tu búsqueda",
|
||||
"resultsFor": "Resultados para ",
|
||||
"forgetAllMyChests": "Olvida todos mis cofres",
|
||||
"transaction": "Transacción",
|
||||
"certification": "Certificación",
|
||||
"identityConfirm": "Confirmación de la identidad",
|
||||
"revokeAdhesion": "Revocación de adhesión",
|
||||
"strangeTransaction": "Transacción extraña",
|
||||
"sending": "Enviando...",
|
||||
"propagating": "Propagando...",
|
||||
"validating": "Validando...",
|
||||
"anErrorOccurred": "Ocurrió un error",
|
||||
"24hbetweenCerts": "You have to wait 24h between certs",
|
||||
"canNotCertifySelf": "You can not certify yourself",
|
||||
"nameAlreadyExist": "This name is already taken",
|
||||
"2GDtoKeepAlive": "You have to keep at least 2ĞD to keep your account alive",
|
||||
"youHaveToFeedThisAccountBeforeUsing": "You have to feed this account\nbefore using it.",
|
||||
"execTimeoutOver": "Execution timeout is over",
|
||||
"seeAWallet": "Ver una billetera",
|
||||
"anErrorOccured": "Ocurrió un error",
|
||||
"24hbetweenCerts": "Hay que esperar 24 horas entre certificaciones",
|
||||
"canNotCertifySelf": "No puedes certificarte a ti mismo",
|
||||
"nameAlreadyExist": "Este nombre ya está ocupado",
|
||||
"2GDtoKeepAlive": "Tienes que mantener al menos 2ĞD para mantener tu cuenta viva",
|
||||
"youHaveToFeedThisAccountBeforeUsing": "Tienes que nutrir el balance\nde esta cuenta antes de usarla.",
|
||||
"execTimeoutOver": "Se ha agotado el tiempo de ejecución",
|
||||
"seeAWallet": "Ver un monedero",
|
||||
"mustWaitXBeforeCertify": "Tienes que esperar\n{} antes de\nvolver a certificar",
|
||||
"mustConfirmHisIdentity": "This person must confirm\nhis identity before can be\ncertified",
|
||||
"canRenewCertInX": "You can renew\nthis certification\nin {}",
|
||||
"executeATransfer": "Execute a transfer",
|
||||
"executeTheTransfer": "Execute the transfer",
|
||||
"doATransfer" : "Execute a\ntransfer",
|
||||
"mustConfirmHisIdentity": "Esta persona debe confirmar\nsu identidad antes de poder ser certificada",
|
||||
"canRenewCertInX": "Podrás renovar\nla certificación\nen {}",
|
||||
"executeATransfer": "Ejecutar una transacción",
|
||||
"executeTheTransfer": "Ejecutar la transacción",
|
||||
"doATransfer" : "Hacer una\ntransacción",
|
||||
"seconds": "{} segundos",
|
||||
"minutes": "{} minutos",
|
||||
"hours": "{} horas {}",
|
||||
"days": "{} dias",
|
||||
"months": "{} meses",
|
||||
"certify": "Certify",
|
||||
"certify": "Certificar esta\nidentidad",
|
||||
"from": "De:",
|
||||
"to": "A:",
|
||||
"amount": "Importe:",
|
||||
"choiceOfSourceWallet": "Choose a source wallet",
|
||||
"choiceOfSourceWallet": "Elige un monedero de origen",
|
||||
"extrinsicInProgress": "{} en progreso",
|
||||
"extrinsicValidated": "{} validado !",
|
||||
"extrinsicValidated": "¡ {} validado !",
|
||||
"fromMinus": "de",
|
||||
"toMinus": "a",
|
||||
"deleteThisWallet": "Delete this wallet",
|
||||
"deleteThisWallet": "Borrar este monedero",
|
||||
"cancel": "Cancelar",
|
||||
"inBlockchainResult": "In {} blockchain",
|
||||
"search": "Buscar",
|
||||
"currencyNode": "{} nodo :",
|
||||
"inBlockchainResult": "En la blockchain {}",
|
||||
"search": "Buscar una identidad\no una dirección",
|
||||
"currencyNode": "Nodo {} :",
|
||||
"contactsManagementWithNbr": "Mis contactos ({})",
|
||||
"contactsManagement": "Mis contactos",
|
||||
"noContacts": "You don't have any contact",
|
||||
"addContact": "Add\nto contacts",
|
||||
"removeContact": "Remove\nthis contact",
|
||||
"derivationsScanProgress": "Scan address {}/{}",
|
||||
"youAreOffline": "You are offline...",
|
||||
"importG1v1": "Import old G1v1 account",
|
||||
"selectDestWallet": "Select a target wallet:",
|
||||
"youMustWaitBeforeCashoutThisAccount": "You have to wait a few moment before migrate this account",
|
||||
"thisAccountIsEmpty": "This account is empty",
|
||||
"youCannotMigrateIdentityToExistingIdentity": "You cannot migrate an identity\nto an account that already has an identity",
|
||||
"importOldAccount": "Import your old account",
|
||||
"enterCesiumId": "Ingrese su ID de Cesium",
|
||||
"enterCesiumPassword": "Ingrese su contraseña de Cesium",
|
||||
"migrateAccount": "Migrate account",
|
||||
"migrateIdentity": "Migrate identity",
|
||||
"identityMigration": "Identity migration",
|
||||
"areYouSureMigrateIdentity": "Are you sure you want to permanently migrate identity **{}** with balance of **{}** ?",
|
||||
"someoneCreatedYourIdentity": "Someone created your {} identity !",
|
||||
"noContacts": "No tienes ningún contacto",
|
||||
"addContact": "Añadir\na contactos",
|
||||
"removeContact": "Eliminar\neste contacto",
|
||||
"derivationsScanProgress": "Escaneado de la dirección {}/{}",
|
||||
"youAreOffline": "Estás desconectado...",
|
||||
"importG1v1": "Importar la cuenta antigua de G1v1",
|
||||
"selectDestWallet": "Selecciona un monedero destino:",
|
||||
"youMustWaitBeforeCashoutThisAccount": "Tienes que esperar unos minutos antes de migrar esta cuenta",
|
||||
"thisAccountIsEmpty": "Esta cuenta está vacía",
|
||||
"youCannotMigrateIdentityToExistingIdentity": "No se puede migrar una identidad\na una cuenta que ya tiene una identidad",
|
||||
"importOldAccount": "Importar antigua cuenta",
|
||||
"enterCesiumId": "Ingresa tu frase secreta de Cesium",
|
||||
"enterCesiumPassword": "Ingresa tu contraseña de Cesium",
|
||||
"migrateAccount": "Migrar cuenta",
|
||||
"migrateIdentity": "Migrar identidad",
|
||||
"identityMigration": "Migración de la identidad",
|
||||
"areYouSureMigrateIdentity": "¿Estás seguro de que quieres migrar permanentemente la identidad **{}** con saldo de **{}**?",
|
||||
"someoneCreatedYourIdentity": "¡ Alguien ha creado tu {} identidad !",
|
||||
"confirmMyIdentity": "Confirmar mi identidad",
|
||||
"revokeMyIdentity": "Revocar mi identidad",
|
||||
"youCannotRevokeThisIdentity": "You cannot revoke this identity while\nit is member of the blacksmiths web",
|
||||
"showUdAmounts": "Show amounts in UD",
|
||||
"ud": "{}UD",
|
||||
"chooseATargetWallet": "Elija una billetera de destino"
|
||||
"youCannotRevokeThisIdentity": "No puedes revocar esta identidad mientras\nseas miembro de la red de forjadores",
|
||||
"showUdAmounts": "Mostrar importes en DU",
|
||||
"ud": "{}DU",
|
||||
"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 \"{}\" ?",
|
||||
"areYouSureForgetAllChests": "Êtes-vous sûr de vouloir oublier tous vos coffres ?",
|
||||
"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",
|
||||
"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.",
|
||||
|
@ -157,7 +158,7 @@
|
|||
"hours": "{} heures {}",
|
||||
"days": "{} jours",
|
||||
"months": "{} mois",
|
||||
"certify": "Certifier",
|
||||
"certify": "Certifier cette\nidentité",
|
||||
"from": "Depuis:",
|
||||
"to": "Vers:",
|
||||
"amount": "Montant:",
|
||||
|
@ -169,7 +170,7 @@
|
|||
"deleteThisWallet": "Supprimer ce portefeuille",
|
||||
"cancel": "Annuler",
|
||||
"inBlockchainResult": "Dans la blockchain {}",
|
||||
"search": "Rechercher",
|
||||
"search": "Rechercher une identité\nou une adresse",
|
||||
"currencyNode": "Noeud {} :",
|
||||
"contactsManagementWithNbr": "Mes contacts ({})",
|
||||
"contactsManagement": "Mes contacts",
|
||||
|
@ -180,7 +181,7 @@
|
|||
"youAreOffline": "Vous êtes hors ligne...",
|
||||
"importG1v1": "Importer un ancien compte G1v1",
|
||||
"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",
|
||||
"youCannotMigrateIdentityToExistingIdentity": "Vous ne pouvez pas migrer une identité\nvers un compte disposant déjà d'une identité",
|
||||
"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",
|
||||
"showUdAmounts": "Afficher les montants en 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"
|
||||
]
|
||||
|
|
|
@ -26,7 +26,7 @@ void main() async {
|
|||
await tapKey(keyImportG1v1);
|
||||
await enterText(keyCesiumId, 'test');
|
||||
await enterText(keyCesiumPassword, 'test');
|
||||
await waitFor(cesiumTest1.shortAddress());
|
||||
await waitFor('DCovzCEnQm9GUWe6mr8u42JR1JAuoj3HbQUGdCkfTzSr');
|
||||
await waitFor('100.0');
|
||||
await waitFor('3', exactMatch: true);
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
|
@ -135,7 +136,7 @@ Future<void> waitFor(String text,
|
|||
Finder finder = exactMatch ? find.text(text) : find.textContaining(text);
|
||||
log.d('INTEGRATION TEST: Wait for: $text');
|
||||
|
||||
final String searchType = reverse ? 'reversed text' : 'text';
|
||||
final searchType = reverse ? 'reversed text' : 'text';
|
||||
|
||||
do {
|
||||
if (DateTime.now().isAfter(end)) {
|
||||
|
|
|
@ -50,3 +50,6 @@ const debugPin = true;
|
|||
String indexerEndpoint = '';
|
||||
late double balanceRatio;
|
||||
late int udValue;
|
||||
|
||||
// Indexer
|
||||
late DateTime startBlockchainTime;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
|
@ -98,31 +99,35 @@ Future<void> main() async {
|
|||
// // ]);
|
||||
// Catcher(rootWidget: Gecko(endPointGVA, _store), debugConfig: debugOptions);
|
||||
|
||||
await SentryFlutter.init(
|
||||
(options) {
|
||||
options.dsn =
|
||||
'https://c09587b46eaa42e8b9fda28d838ed180@o496840.ingest.sentry.io/5572110';
|
||||
},
|
||||
appRunner: () => runApp(
|
||||
EasyLocalization(
|
||||
supportedLocales: const [Locale('en'), Locale('fr'), Locale('es')],
|
||||
path: 'assets/translations',
|
||||
fallbackLocale: const Locale('en'),
|
||||
child: const Gecko(),
|
||||
),
|
||||
),
|
||||
);
|
||||
await SentryFlutter.init((options) {
|
||||
options.dsn =
|
||||
'https://c09587b46eaa42e8b9fda28d838ed180@o496840.ingest.sentry.io/5572110';
|
||||
},
|
||||
appRunner: () => SystemChrome.setPreferredOrientations(
|
||||
[DeviceOrientation.portraitUp]).then((_) {
|
||||
runApp(EasyLocalization(
|
||||
supportedLocales: const [
|
||||
Locale('en'),
|
||||
Locale('fr'),
|
||||
Locale('es')
|
||||
],
|
||||
path: 'assets/translations',
|
||||
fallbackLocale: const Locale('en'),
|
||||
child: const Gecko(),
|
||||
));
|
||||
}));
|
||||
} else {
|
||||
log.i('Debug mode enabled: No sentry alerte');
|
||||
|
||||
runApp(
|
||||
EasyLocalization(
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
|
||||
.then((_) {
|
||||
runApp(EasyLocalization(
|
||||
supportedLocales: const [Locale('en'), Locale('fr'), Locale('es')],
|
||||
path: 'assets/translations',
|
||||
fallbackLocale: const Locale('en'),
|
||||
child: const Gecko(),
|
||||
),
|
||||
);
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,8 +136,6 @@ class Gecko extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
|
||||
// To configure multi_endpoints GraphQLProvider: https://stackoverflow.com/q/70656513/8301867
|
||||
|
||||
return MultiProvider(
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
|
||||
part 'chest_data.g.dart';
|
||||
|
||||
@HiveType(typeId: 1)
|
||||
|
|
|
@ -56,5 +56,43 @@ query ($address: String!, $number: Int!, $cursor: String) {
|
|||
}
|
||||
''';
|
||||
|
||||
// To parse indexer date format
|
||||
// log.d(DateTime.parse("2022-06-13T16:51:24.001+00:00").toString());
|
||||
const String getCertsReceived = r'''
|
||||
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 keyActivityScreen = Key('keyActivityScreen');
|
||||
|
||||
// Certification view
|
||||
const keyCertsReceived = Key('keyCertsReceived');
|
||||
|
||||
// Unlock wallet
|
||||
const keyUnlockWallet = Key('keyUnlockWallet');
|
||||
const keyPinForm = Key('keyPinForm');
|
||||
|
|
|
@ -8,8 +8,6 @@ import 'package:path_provider/path_provider.dart';
|
|||
|
||||
class CesiumPlusProvider with ChangeNotifier {
|
||||
TextEditingController cesiumName = TextEditingController();
|
||||
Image defaultAvatar(double size) =>
|
||||
Image.asset(('assets/icon_user.png'), height: size);
|
||||
|
||||
CancelToken avatarCancelToken = CancelToken();
|
||||
|
||||
|
@ -156,3 +154,6 @@ class CesiumPlusProvider with ChangeNotifier {
|
|||
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 {
|
||||
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) {
|
||||
await sub.deleteAccounts(getChestWallets(chest));
|
||||
await chestBox.delete(chest.key);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
|
||||
myWalletProvider.pinCode = '';
|
||||
|
|
|
@ -162,7 +162,7 @@ class DuniterIndexer with ChangeNotifier {
|
|||
Color color = Colors.black,
|
||||
FontWeight fontWeight = FontWeight.w400,
|
||||
FontStyle fontStyle = FontStyle.italic]) {
|
||||
WalletOptionsProvider walletOptions =
|
||||
final walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||
if (indexerEndpoint == '') {
|
||||
if (wallet == null) {
|
||||
|
@ -247,10 +247,9 @@ class DuniterIndexer with ChangeNotifier {
|
|||
Widget searchIdentity(BuildContext context, String name) {
|
||||
// WalletOptionsProvider _walletOptions =
|
||||
// Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||
CesiumPlusProvider cesiumPlusProvider =
|
||||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
||||
WalletsProfilesProvider walletsProfiles =
|
||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
if (indexerEndpoint == '') {
|
||||
return const Text('Aucun résultat');
|
||||
}
|
||||
|
@ -294,6 +293,11 @@ class DuniterIndexer with ChangeNotifier {
|
|||
return Text('noResult'.tr());
|
||||
}
|
||||
|
||||
for (Map profile in identities) {
|
||||
duniterIndexer.walletNameIndexer
|
||||
.putIfAbsent(profile['pubkey'], () => profile['name']);
|
||||
}
|
||||
|
||||
double avatarSize = 55;
|
||||
return Expanded(
|
||||
child: ListView(children: <Widget>[
|
||||
|
@ -304,7 +308,7 @@ class DuniterIndexer with ChangeNotifier {
|
|||
key: keySearchResult(profile['pubkey']),
|
||||
horizontalTitleGap: 40,
|
||||
contentPadding: const EdgeInsets.all(5),
|
||||
leading: cesiumPlusProvider.defaultAvatar(avatarSize),
|
||||
leading: defaultAvatar(avatarSize),
|
||||
title: Row(children: <Widget>[
|
||||
Text(getShortPubkey(profile['pubkey']),
|
||||
style: const TextStyle(
|
||||
|
@ -340,10 +344,7 @@ class DuniterIndexer with ChangeNotifier {
|
|||
walletsProfiles.address = profile['pubkey'];
|
||||
return WalletViewScreen(
|
||||
address: profile['pubkey'],
|
||||
username: g1WalletsBox
|
||||
.get(profile['pubkey'])
|
||||
?.id
|
||||
?.username,
|
||||
username: name,
|
||||
avatar:
|
||||
g1WalletsBox.get(profile['pubkey'])?.avatar,
|
||||
);
|
||||
|
@ -369,8 +370,8 @@ class DuniterIndexer with ChangeNotifier {
|
|||
transBC.add(i);
|
||||
transBC[i] = [];
|
||||
transBC[i].add(DateTime.parse(transaction['created_at']));
|
||||
final int amountBrut = transaction['amount'];
|
||||
final double amount = removeDecimalZero(amountBrut / 100);
|
||||
final amountBrut = transaction['amount'];
|
||||
final amount = removeDecimalZero(amountBrut / 100);
|
||||
if (direction == "RECEIVED") {
|
||||
transBC[i].add(transaction['issuer_pubkey']);
|
||||
transBC[i].add(transaction['issuer']['identity']?['name'] ?? '');
|
||||
|
@ -447,3 +448,36 @@ class DuniterIndexer with ChangeNotifier {
|
|||
// checkHistoryResult(
|
||||
// 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 {
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
|
||||
generatedMnemonic = await sub.generateMnemonic(lang: appLang);
|
||||
List<String> wordsList = [];
|
||||
|
@ -369,7 +369,7 @@ class GenerateWalletsProvider with ChangeNotifier {
|
|||
}
|
||||
|
||||
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');
|
||||
bool isAlive = false;
|
||||
scanedValidWalletNumber = 0;
|
||||
|
@ -445,6 +445,8 @@ class GenerateWalletsProvider with ChangeNotifier {
|
|||
onTimeout: () => {},
|
||||
);
|
||||
|
||||
log.d(balance);
|
||||
|
||||
log.d(
|
||||
"${addressData.address!}: ${balance['transferableBalance']} $currencyName");
|
||||
if (balance['transferableBalance'] != 0) {
|
||||
|
|
|
@ -8,6 +8,7 @@ import 'dart:math';
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'dart:async';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
|
@ -133,7 +134,7 @@ class HomeProvider with ChangeNotifier {
|
|||
// }
|
||||
|
||||
Widget bottomAppBar(BuildContext context) {
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
WalletsProfilesProvider historyProvider =
|
||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||
|
|
|
@ -86,8 +86,8 @@ class MyWalletsProvider with ChangeNotifier {
|
|||
}
|
||||
|
||||
Future<int> deleteAllWallet(context) async {
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
try {
|
||||
log.w('DELETE ALL WALLETS ?');
|
||||
|
@ -124,7 +124,7 @@ class MyWalletsProvider with ChangeNotifier {
|
|||
|
||||
int? chest = getCurrentChest();
|
||||
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
|
||||
WalletData defaultWallet = getDefaultWallet();
|
||||
|
||||
|
@ -147,7 +147,7 @@ class MyWalletsProvider with ChangeNotifier {
|
|||
}
|
||||
|
||||
Future<void> generateRootWallet(context, String name) async {
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
|
||||
isNewDerivationLoading = true;
|
||||
|
@ -162,7 +162,7 @@ class MyWalletsProvider with ChangeNotifier {
|
|||
} else {
|
||||
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();
|
||||
|
||||
|
|
|
@ -68,8 +68,7 @@ class SearchProvider with ChangeNotifier {
|
|||
// }
|
||||
|
||||
Future<List<G1WalletsList>> searchAddress() async {
|
||||
final WalletsProfilesProvider walletProfiles =
|
||||
WalletsProfilesProvider('pubkey');
|
||||
final walletProfiles = WalletsProfilesProvider('pubkey');
|
||||
|
||||
if (walletProfiles.isAddress(searchController.text)) {
|
||||
G1WalletsList wallet = G1WalletsList(address: searchController.text);
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:fast_base58/fast_base58.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/chest_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/my_wallets.dart';
|
||||
import 'package:gecko/providers/wallet_options.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/types/networkParams.dart';
|
||||
import 'package:polkawallet_sdk/api/types/txInfoData.dart';
|
||||
|
@ -39,9 +42,11 @@ class SubstrateSdk with ChangeNotifier {
|
|||
TextEditingController csSalt = TextEditingController();
|
||||
TextEditingController csPassword = TextEditingController();
|
||||
String g1V1NewAddress = '';
|
||||
String g1V1OldPubkey = '';
|
||||
bool isCesiumIDVisible = false;
|
||||
bool isCesiumAddresLoading = false;
|
||||
late int udValue;
|
||||
Map<String, List<int>> certsCounterCache = {};
|
||||
|
||||
/////////////////////////////////////
|
||||
////////// 1: API METHODS ///////////
|
||||
|
@ -122,12 +127,20 @@ class SubstrateSdk with ChangeNotifier {
|
|||
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 certsReceiver =
|
||||
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 {
|
||||
|
@ -275,6 +288,9 @@ class SubstrateSdk with ChangeNotifier {
|
|||
result.putIfAbsent('certDelay', () => certDelayDuration);
|
||||
} else if (toStatus == 'Created') {
|
||||
result.putIfAbsent('toStatus', () => 1);
|
||||
} else if (toStatus == 'noid') {
|
||||
result.putIfAbsent('toStatus', () => 2);
|
||||
result.putIfAbsent('canCert', () => 0);
|
||||
} else {
|
||||
result.putIfAbsent('canCert', () => 0);
|
||||
}
|
||||
|
@ -295,7 +311,7 @@ class SubstrateSdk with ChangeNotifier {
|
|||
}
|
||||
|
||||
Future<String> idtyStatus(String address) async {
|
||||
// WalletOptionsProvider walletOptions =
|
||||
// final walletOptions =
|
||||
// Provider.of<WalletOptionsProvider>(homeContext, listen: false);
|
||||
|
||||
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 {
|
||||
final String genesisHash = await sdk.webView!.evalJavascript(
|
||||
'api.genesisHash.toHex()',
|
||||
|
@ -380,6 +405,77 @@ class SubstrateSdk with ChangeNotifier {
|
|||
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 //////
|
||||
/////////////////////////////////////
|
||||
|
@ -400,9 +496,8 @@ class SubstrateSdk with ChangeNotifier {
|
|||
}
|
||||
|
||||
Future<void> connectNode(BuildContext ctx) async {
|
||||
HomeProvider homeProvider = Provider.of<HomeProvider>(ctx, listen: false);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(ctx, listen: false);
|
||||
final homeProvider = Provider.of<HomeProvider>(ctx, listen: false);
|
||||
final myWalletProvider = Provider.of<MyWalletsProvider>(ctx, listen: false);
|
||||
|
||||
homeProvider.changeMessage("connectionPending".tr(), 0);
|
||||
|
||||
|
@ -446,6 +541,9 @@ class SubstrateSdk with ChangeNotifier {
|
|||
await initCurrencyParameters();
|
||||
await getBalanceRatio();
|
||||
|
||||
// Indexer
|
||||
getBlockStart();
|
||||
|
||||
notifyListeners();
|
||||
homeProvider.changeMessage(
|
||||
"wellConnectedToNode"
|
||||
|
@ -568,7 +666,7 @@ class SubstrateSdk with ChangeNotifier {
|
|||
Future<KeyPairData?> changePassword(BuildContext context, String address,
|
||||
String passOld, String passNew) async {
|
||||
final account = getKeypair(address);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
keyring.setCurrent(account);
|
||||
myWalletProvider.resetPinCode();
|
||||
|
@ -680,6 +778,9 @@ class SubstrateSdk with ChangeNotifier {
|
|||
cryptoType: CryptoType.ed25519,
|
||||
rawSeed: rawSeedHex);
|
||||
|
||||
SigningKey rootKey = SigningKey(seed: rawSeed);
|
||||
g1V1OldPubkey = Base58Encode(rootKey.publicKey);
|
||||
|
||||
g1V1NewAddress = newAddress.address!;
|
||||
notifyListeners();
|
||||
return g1V1NewAddress;
|
||||
|
@ -695,8 +796,15 @@ class SubstrateSdk with ChangeNotifier {
|
|||
final fromHasConsumer =
|
||||
fromAddress == '' ? false : await hasAccountConsumers(fromAddress);
|
||||
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 = [];
|
||||
String? rawParams;
|
||||
|
||||
final toCerts = await getCerts(destAddress);
|
||||
final toCerts = await getCertsCounter(destAddress);
|
||||
|
||||
// log.d('debug: ${currencyParameters['minCertForMembership']}');
|
||||
|
||||
|
@ -1007,7 +1115,7 @@ void snackNode(BuildContext context, bool isConnected) {
|
|||
if (!isConnected) {
|
||||
message = "noDuniterNodeAvailableTryLater".tr();
|
||||
} else {
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
|
||||
message =
|
||||
"${"youAreConnectedToNode".tr()}\n${sub.getConnectedEndpoint()!.split('//')[1]}";
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'dart:io';
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'dart:async';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
|
@ -51,7 +52,7 @@ class WalletOptionsProvider with ChangeNotifier {
|
|||
}
|
||||
|
||||
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(
|
||||
context, 'areYouSureToForgetWallet'.tr(args: [wallet.name!])));
|
||||
|
||||
|
@ -59,7 +60,7 @@ class WalletOptionsProvider with ChangeNotifier {
|
|||
//Check if balance is null
|
||||
final balance = await sub.getBalance(wallet.address!);
|
||||
if (balance != {}) {
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
final defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
log.d(defaultWallet.address);
|
||||
|
@ -134,12 +135,11 @@ class WalletOptionsProvider with ChangeNotifier {
|
|||
|
||||
Widget idtyStatus(BuildContext context, String address,
|
||||
{bool isOwner = false, Color color = Colors.black}) {
|
||||
DuniterIndexer duniterIndexer =
|
||||
Provider.of<DuniterIndexer>(context, listen: false);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
|
||||
showText(String text,
|
||||
[double size = 18, bool bold = false, bool smooth = true]) {
|
||||
log.d('$address $text');
|
||||
// log.d('$address $text');
|
||||
return AnimatedFadeOutIn<String>(
|
||||
data: text,
|
||||
duration: Duration(milliseconds: smooth ? 200 : 0),
|
||||
|
@ -212,18 +212,21 @@ class WalletOptionsProvider with ChangeNotifier {
|
|||
}
|
||||
|
||||
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';
|
||||
}
|
||||
|
||||
Future<String?> confirmIdentityPopup(BuildContext context) async {
|
||||
TextEditingController idtyName = TextEditingController();
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
WalletOptionsProvider walletOptions =
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
|
||||
bool canValidate = false;
|
||||
bool idtyExist = false;
|
||||
|
||||
return showDialog<String>(
|
||||
context: context,
|
||||
barrierDismissible: true, // user must tap button!
|
||||
|
@ -240,7 +243,16 @@ class WalletOptionsProvider with ChangeNotifier {
|
|||
const SizedBox(height: 20),
|
||||
TextField(
|
||||
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>[
|
||||
// FilteringTextInputFormatter.allow(RegExp("[0-9a-zA-Z]")),
|
||||
FilteringTextInputFormatter.deny(RegExp(r'^ ')),
|
||||
|
@ -250,7 +262,12 @@ class WalletOptionsProvider with ChangeNotifier {
|
|||
autofocus: true,
|
||||
controller: idtyName,
|
||||
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>[
|
||||
|
@ -261,61 +278,66 @@ class WalletOptionsProvider with ChangeNotifier {
|
|||
builder: (context, wOptions, _) {
|
||||
return TextButton(
|
||||
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(
|
||||
"validate".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 21,
|
||||
color: idtyName.text.length.clamp(3, 64) ==
|
||||
idtyName.text.length
|
||||
? const Color(0xffD80000)
|
||||
: Colors.grey,
|
||||
),
|
||||
fontSize: 21,
|
||||
color: canValidate
|
||||
? const Color(0xffD80000)
|
||||
: Colors.grey[500]),
|
||||
),
|
||||
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) {
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
|
||||
bool isNameValid = walletName.text.length >= 2 &&
|
||||
|
@ -585,7 +607,7 @@ Widget getCerts(BuildContext context, String address, double size,
|
|||
return Column(children: <Widget>[
|
||||
Consumer<SubstrateSdk>(builder: (context, sdk, _) {
|
||||
return FutureBuilder(
|
||||
future: sdk.getCerts(address),
|
||||
future: sdk.getCertsCounter(address),
|
||||
builder: (BuildContext context, AsyncSnapshot<List<int>> certs) {
|
||||
// log.d(_certs.data);
|
||||
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
import 'dart:io';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:gecko/globals.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:jdenticon_dart/jdenticon_dart.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
// import 'package:qrscan/qrscan.dart' as scanner;
|
||||
import 'package:barcode_scan2/barcode_scan2.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class WalletsProfilesProvider with ChangeNotifier {
|
||||
WalletsProfilesProvider(this.address);
|
||||
|
@ -44,7 +37,10 @@ class WalletsProfilesProvider with ChangeNotifier {
|
|||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return WalletViewScreen(address: barcode!.rawContent);
|
||||
return WalletViewScreen(
|
||||
address: barcode!.rawContent,
|
||||
username: '',
|
||||
);
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
|
@ -129,102 +125,6 @@ class WalletsProfilesProvider with ChangeNotifier {
|
|||
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) {
|
||||
return contactsBox.containsKey(address);
|
||||
}
|
||||
|
@ -252,3 +152,12 @@ snackCopyKey(context) {
|
|||
duration: const Duration(seconds: 2));
|
||||
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
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/queries_indexer.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/home.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/providers/wallets_profiles.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/screens/wallet_view.dart';
|
||||
import 'package:gecko/widgets/header_profile.dart';
|
||||
import 'package:graphql_flutter/graphql_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
|
@ -31,12 +31,11 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
WalletsProfilesProvider walletProfile =
|
||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||
HomeProvider homeProvider =
|
||||
Provider.of<HomeProvider>(context, listen: false);
|
||||
|
||||
// log.d('aaaaaaaaaaaaaaaaaaaaa $startBlockchainTime');
|
||||
|
||||
return Scaffold(
|
||||
key: _scaffoldKey,
|
||||
appBar: AppBar(
|
||||
|
@ -49,17 +48,16 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
),
|
||||
bottomNavigationBar: homeProvider.bottomAppBar(context),
|
||||
body: Column(children: <Widget>[
|
||||
walletProfile.headerProfileView(context, address, username),
|
||||
HeaderProfile(address: address, username: username),
|
||||
historyQuery(context),
|
||||
]));
|
||||
}
|
||||
|
||||
Widget historyQuery(context) {
|
||||
DuniterIndexer duniterIndexer =
|
||||
Provider.of<DuniterIndexer>(context, listen: false);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
|
||||
if (indexerEndpoint == '') {
|
||||
Column(children: <Widget>[
|
||||
return Column(children: <Widget>[
|
||||
const SizedBox(height: 50),
|
||||
Text(
|
||||
"noNetworkNoHistory".tr(),
|
||||
|
@ -158,8 +156,7 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
}
|
||||
|
||||
Widget historyView(context, result) {
|
||||
DuniterIndexer duniterIndexer =
|
||||
Provider.of<DuniterIndexer>(context, listen: false);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
|
||||
return duniterIndexer.transBC == null
|
||||
? Column(children: <Widget>[
|
||||
|
@ -193,9 +190,6 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
|
||||
Widget getTransactionTile(
|
||||
BuildContext context, DuniterIndexer duniterIndexer) {
|
||||
CesiumPlusProvider cesiumPlusProvider =
|
||||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
||||
|
||||
int keyID = 0;
|
||||
String? dateDelimiter;
|
||||
String? lastDateDelimiter;
|
||||
|
@ -204,6 +198,8 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
bool isTody = false;
|
||||
bool isYesterday = false;
|
||||
bool isThisWeek = false;
|
||||
bool isMigrationTime = false;
|
||||
bool isMigrationTimePassed = false;
|
||||
|
||||
final Map<int, String> monthsInYear = {
|
||||
1: "month1".tr(),
|
||||
|
@ -286,7 +282,25 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
finalAmount = '$amount $currencyName';
|
||||
}
|
||||
|
||||
if (!isMigrationTimePassed && date.compareTo(startBlockchainTime) < 0) {
|
||||
isMigrationTimePassed = true;
|
||||
isMigrationTime = true;
|
||||
} else {
|
||||
isMigrationTime = false;
|
||||
}
|
||||
|
||||
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)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 30),
|
||||
|
@ -305,7 +319,7 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
contentPadding: const EdgeInsets.only(
|
||||
left: 20, right: 30, top: 15, bottom: 15),
|
||||
leading: ClipOval(
|
||||
child: cesiumPlusProvider.defaultAvatar(avatarSize),
|
||||
child: defaultAvatar(avatarSize),
|
||||
),
|
||||
title: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 5),
|
||||
|
@ -353,7 +367,10 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return WalletViewScreen(address: repository[1]);
|
||||
return WalletViewScreen(
|
||||
address: repository[1],
|
||||
username: username ?? '',
|
||||
);
|
||||
}),
|
||||
);
|
||||
// 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) {
|
||||
final double screenWidth = MediaQuery.of(homeContext).size.width;
|
||||
final screenWidth = MediaQuery.of(homeContext).size.width;
|
||||
return Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||
return Visibility(
|
||||
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 {
|
||||
return showDialog<void>(
|
||||
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/search.dart';
|
||||
import 'package:gecko/screens/settings.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:gecko/screens/my_contacts.dart';
|
||||
|
||||
|
@ -32,11 +32,10 @@ class HomeScreen extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
homeContext = context;
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context);
|
||||
|
||||
final myWalletProvider = Provider.of<MyWalletsProvider>(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();
|
||||
|
||||
|
@ -104,7 +103,7 @@ class HomeScreen extends StatelessWidget {
|
|||
builder: (ctx) => StatefulWrapper(
|
||||
onInit: () {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
DuniterIndexer duniterIndexer =
|
||||
final duniterIndexer =
|
||||
Provider.of<DuniterIndexer>(ctx, listen: false);
|
||||
duniterIndexer.getValidIndexerEndpoint();
|
||||
|
||||
|
@ -183,12 +182,12 @@ class HomeScreen extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget geckHome(context) {
|
||||
MyWalletsProvider myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||
Provider.of<ChestProvider>(context);
|
||||
|
||||
WalletsProfilesProvider historyProvider =
|
||||
Provider.of<WalletsProfilesProvider>(context);
|
||||
final double statusBarHeight = MediaQuery.of(context).padding.top;
|
||||
final statusBarHeight = MediaQuery.of(context).padding.top;
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
|
@ -434,7 +433,7 @@ Widget geckHome(context) {
|
|||
}
|
||||
|
||||
Widget welcomeHome(context) {
|
||||
final double statusBarHeight = MediaQuery.of(context).padding.top;
|
||||
final statusBarHeight = MediaQuery.of(context).padding.top;
|
||||
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:durt/durt.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/stateful_wrapper.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
|
@ -26,9 +26,8 @@ class ChangePinScreen extends StatelessWidget with ChangeNotifier {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
|
||||
return WillPopScope(
|
||||
|
|
|
@ -4,7 +4,7 @@ import 'package:easy_localization/easy_localization.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/chest_data.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/chest_provider.dart';
|
||||
|
@ -25,9 +25,7 @@ class ChestOptions extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
ChestProvider chestProvider =
|
||||
Provider.of<ChestProvider>(context, listen: false);
|
||||
final chestProvider = Provider.of<ChestProvider>(context, listen: false);
|
||||
HomeProvider homeProvider =
|
||||
Provider.of<HomeProvider>(context, listen: false);
|
||||
|
||||
|
@ -61,7 +59,7 @@ class ChestOptions extends StatelessWidget {
|
|||
InkWell(
|
||||
key: keyShowSeed,
|
||||
onTap: () async {
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
WalletData? defaultWallet =
|
||||
myWalletProvider.getDefaultWallet();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/my_wallets.dart';
|
||||
|
@ -30,9 +30,7 @@ class _ChooseChestState extends State<ChooseChest> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context);
|
||||
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
|
@ -23,8 +23,7 @@ class ChooseWalletScreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final int chest = configBox.get('currentChest');
|
||||
|
||||
return Scaffold(
|
||||
|
@ -73,9 +72,7 @@ class ChooseWalletScreen extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget myWalletsTiles(BuildContext context, int currentChest) {
|
||||
MyWalletsProvider myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context);
|
||||
// SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||
|
||||
final bool isWalletsExists = myWalletProvider.checkIfWalletExist();
|
||||
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
|
@ -98,7 +95,7 @@ class ChooseWalletScreen extends StatelessWidget {
|
|||
}
|
||||
|
||||
List listWallets = myWalletProvider.listWallets;
|
||||
final double screenWidth = MediaQuery.of(context).size.width;
|
||||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
int nTule = 2;
|
||||
|
||||
if (screenWidth >= 900) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
|
@ -27,8 +27,7 @@ class _CustomDerivationState extends State<CustomDerivation> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
|
||||
final derivationList = <String>[
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'dart:async';
|
|||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
|
@ -21,10 +22,9 @@ class ImportG1v1 extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
WalletOptionsProvider walletOptions =
|
||||
final walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
|
||||
Timer? debounce;
|
||||
|
@ -83,6 +83,7 @@ class ImportG1v1 extends StatelessWidget {
|
|||
final String idtyStatus = status.data?[1];
|
||||
final String myIdtyStatus = status.data?[2];
|
||||
final bool hasConsumer = status.data?[3] ?? false;
|
||||
final bool isSmith = status.data?[4] ?? false;
|
||||
|
||||
// log.d('hasconsumer: $hasConsumer');
|
||||
|
||||
|
@ -92,7 +93,7 @@ class ImportG1v1 extends StatelessWidget {
|
|||
} else {
|
||||
canValidate = false;
|
||||
validationStatus = hasConsumer
|
||||
? 'youMustWaitBeforeCashoutThisAccount'.tr(args: ['X'])
|
||||
? 'youMustWaitBeforeCashoutThisAccount'.tr()
|
||||
: 'thisAccountIsEmpty'.tr();
|
||||
}
|
||||
|
||||
|
@ -102,6 +103,11 @@ class ImportG1v1 extends StatelessWidget {
|
|||
'youCannotMigrateIdentityToExistingIdentity'.tr();
|
||||
}
|
||||
|
||||
if (isSmith) {
|
||||
canValidate = false;
|
||||
validationStatus = 'smithCantMigrateIdentity'.tr();
|
||||
}
|
||||
|
||||
if (sub.g1V1NewAddress == '') {
|
||||
validationStatus = '';
|
||||
}
|
||||
|
@ -185,13 +191,13 @@ class ImportG1v1 extends StatelessWidget {
|
|||
key: keyCopyAddress,
|
||||
onTap: () {
|
||||
Clipboard.setData(
|
||||
ClipboardData(text: sub.g1V1NewAddress));
|
||||
ClipboardData(text: sub.g1V1OldPubkey));
|
||||
snackCopyKey(context);
|
||||
},
|
||||
child: Text(
|
||||
getShortPubkey(sub.g1V1NewAddress),
|
||||
sub.g1V1OldPubkey,
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
|
@ -308,7 +314,7 @@ class ImportG1v1 extends StatelessWidget {
|
|||
}
|
||||
|
||||
void resetScreen(BuildContext context) {
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
|
||||
sub.csSalt.text = '';
|
||||
sub.csPassword.text = '';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
|
@ -27,7 +27,6 @@ class ManageMembership extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
final sub = Provider.of<SubstrateSdk>(context);
|
||||
|
||||
return Scaffold(
|
||||
|
@ -116,9 +115,9 @@ class ManageMembership extends StatelessWidget {
|
|||
false;
|
||||
|
||||
if (answer) {
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
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();
|
||||
// final wallet = mw.getWalletDataByAddress(address);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -20,14 +20,12 @@ class MigrateIdentityScreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
// HomeProvider _homeProvider = Provider.of<HomeProvider>(context);
|
||||
WalletOptionsProvider walletOptions =
|
||||
// final _homeProvider = Provider.of<HomeProvider>(context);
|
||||
final walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
DuniterIndexer duniterIndexer =
|
||||
Provider.of<DuniterIndexer>(context, listen: false);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
|
||||
final fromAddress = walletOptions.address.text;
|
||||
final defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
|
@ -103,12 +101,21 @@ class MigrateIdentityScreen extends StatelessWidget {
|
|||
final String idtyStatus = status.data?[1];
|
||||
final String myIdtyStatus = status.data?[2];
|
||||
final bool hasConsumer = status.data?[3] ?? false;
|
||||
final bool isSmith = status.data?[4] ?? false;
|
||||
|
||||
// log.d('hasconsumer: $hasConsumer');
|
||||
|
||||
if (balance['transferableBalance'] != 0 && !hasConsumer) {
|
||||
if (isSmith) {
|
||||
canValidate = false;
|
||||
validationStatus = 'smithCantMigrateIdentity'.tr();
|
||||
} else if (balance['transferableBalance'] != 0 &&
|
||||
!hasConsumer) {
|
||||
canValidate = true;
|
||||
validationStatus = '';
|
||||
} else if (idtyStatus != 'noid' && myIdtyStatus != 'noid') {
|
||||
canValidate = false;
|
||||
validationStatus =
|
||||
'youCannotMigrateIdentityToExistingIdentity'.tr();
|
||||
} else {
|
||||
canValidate = false;
|
||||
validationStatus = hasConsumer
|
||||
|
@ -116,12 +123,6 @@ class MigrateIdentityScreen extends StatelessWidget {
|
|||
: 'thisAccountIsEmpty'.tr();
|
||||
}
|
||||
|
||||
if (idtyStatus != 'noid' && myIdtyStatus != 'noid') {
|
||||
canValidate = false;
|
||||
validationStatus =
|
||||
'youCannotMigrateIdentityToExistingIdentity'.tr();
|
||||
}
|
||||
|
||||
log.d(
|
||||
'tatatata: ${sub.g1V1NewAddress}, ${selectedWallet.address!}, $balance, $idtyStatus, $myIdtyStatus');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:bubble/bubble.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
|
@ -19,10 +19,8 @@ class RestoreChest extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
GenerateWalletsProvider genW =
|
||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final genW = Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
|
||||
genW.actualWallet = null;
|
||||
if (genW.isSentenceComplete(context)) {
|
||||
|
@ -183,7 +181,7 @@ class RestoreChest extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget arrayCell(BuildContext context, TextEditingController cellCtl) {
|
||||
GenerateWalletsProvider generateWalletProvider =
|
||||
final generateWalletProvider =
|
||||
Provider.of<GenerateWalletsProvider>(context);
|
||||
|
||||
return Container(
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/my_wallets.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/providers/wallets_profiles.dart';
|
||||
import 'package:gecko/screens/common_elements.dart';
|
||||
import 'package:pdf/pdf.dart';
|
||||
import 'package:printing/printing.dart';
|
||||
|
@ -23,12 +25,11 @@ class ShowSeed extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
CommonElements common = CommonElements();
|
||||
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
|
||||
WalletData defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
|
||||
|
@ -83,7 +84,7 @@ class ShowSeed extends StatelessWidget {
|
|||
onPressed: () {
|
||||
Clipboard.setData(
|
||||
ClipboardData(text: seed.data));
|
||||
snackCopyKey(context);
|
||||
snackCopySeed(context);
|
||||
},
|
||||
child: Row(children: <Widget>[
|
||||
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) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 3),
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import 'dart:async';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/models/chest_data.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
|
@ -30,9 +30,7 @@ class UnlockingWallet extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
WalletOptionsProvider walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context);
|
||||
final walletOptions = Provider.of<WalletOptionsProvider>(context);
|
||||
// final double statusBarHeight = MediaQuery.of(context).padding.top;
|
||||
|
||||
currentChestNumber = configBox.get('currentChest');
|
||||
|
@ -163,11 +161,9 @@ class UnlockingWallet extends StatelessWidget {
|
|||
StreamController<ErrorAnimationType> errorController =
|
||||
StreamController<ErrorAnimationType>();
|
||||
TextEditingController enterPin = TextEditingController();
|
||||
WalletOptionsProvider walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context);
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final walletOptions = Provider.of<WalletOptionsProvider>(context);
|
||||
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
FocusNode pinFocus = FocusNode();
|
||||
|
||||
WalletData defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'dart:async';
|
|||
import 'dart:io';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
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/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/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/screens/activity.dart';
|
||||
import 'package:gecko/screens/myWallets/manage_membership.dart';
|
||||
import 'package:gecko/screens/qrcode_fullscreen.dart';
|
||||
import 'package:gecko/widgets/page_route_no_transition.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:qr_flutter/qr_flutter.dart';
|
||||
|
||||
class WalletOptions extends StatelessWidget {
|
||||
|
@ -26,25 +29,23 @@ class WalletOptions extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
WalletOptionsProvider walletOptions =
|
||||
final walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||
WalletsProfilesProvider historyProvider =
|
||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
HomeProvider homeProvider =
|
||||
Provider.of<HomeProvider>(context, listen: false);
|
||||
DuniterIndexer duniterIndexer =
|
||||
Provider.of<DuniterIndexer>(context, listen: false);
|
||||
final duniterIndexer = 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(0, 20);
|
||||
|
||||
log.d(walletOptions.address.text);
|
||||
|
||||
final int currentChest = myWalletProvider.getCurrentChest();
|
||||
final currentChest = myWalletProvider.getCurrentChest();
|
||||
|
||||
// final currentWallet = _myWalletProvider.getDefaultWallet();
|
||||
// log.d(_walletOptions.getAddress(_currentChest, 3));
|
||||
|
@ -144,16 +145,38 @@ class WalletOptions extends StatelessWidget {
|
|||
balance(
|
||||
context, walletProvider.address.text, 21),
|
||||
const SizedBox(width: 30),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
walletOptions.idtyStatus(
|
||||
context, walletOptions.address.text,
|
||||
isOwner: true, color: orangeC),
|
||||
getCerts(context,
|
||||
walletProvider.address.text, 15),
|
||||
]),
|
||||
|
||||
InkWell(
|
||||
onTap: () => duniterIndexer.walletNameIndexer[
|
||||
walletProvider.address.text] !=
|
||||
null
|
||||
? {
|
||||
Navigator.push(
|
||||
context,
|
||||
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),
|
||||
]),
|
||||
const Spacer(flex: 2),
|
||||
|
@ -302,7 +325,7 @@ class WalletOptions extends StatelessWidget {
|
|||
foregroundColor: Colors.white, elevation: 4,
|
||||
backgroundColor: orangeC, // foreground
|
||||
),
|
||||
onPressed: () {
|
||||
onPressed: () async {
|
||||
walletProvider.confirmIdentityPopup(context);
|
||||
// Navigator.push(
|
||||
// context,
|
||||
|
@ -337,7 +360,7 @@ class WalletOptions extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget pubkeyWidget(WalletOptionsProvider walletProvider, BuildContext ctx) {
|
||||
final String shortPubkey = getShortPubkey(walletProvider.address.text);
|
||||
final shortPubkey = getShortPubkey(walletProvider.address.text);
|
||||
return GestureDetector(
|
||||
key: keyCopyAddress,
|
||||
onTap: () {
|
||||
|
@ -437,7 +460,7 @@ class WalletOptions extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget manageMembership(BuildContext context) {
|
||||
WalletOptionsProvider walletOptions =
|
||||
final walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||
return InkWell(
|
||||
key: keyManageMembership,
|
||||
|
@ -469,8 +492,8 @@ class WalletOptions extends StatelessWidget {
|
|||
Widget setDefaultWalletWidget(
|
||||
BuildContext context,
|
||||
WalletOptionsProvider walletProvider,
|
||||
MyWalletsProvider myWalletProvider,
|
||||
WalletOptionsProvider walletOptions,
|
||||
final myWalletProvider,
|
||||
final walletOptions,
|
||||
int currentChest) {
|
||||
return Consumer<MyWalletsProvider>(builder: (context, myWalletProvider, _) {
|
||||
WalletData defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
|
@ -511,10 +534,10 @@ class WalletOptions extends StatelessWidget {
|
|||
}
|
||||
|
||||
Future setDefaultWallet(BuildContext context, int currentChest) async {
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
WalletOptionsProvider walletOptions =
|
||||
final walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||
|
||||
// WalletData defaultWallet = _myWalletProvider.getDefaultWallet()!;
|
||||
|
@ -527,8 +550,8 @@ class WalletOptions extends StatelessWidget {
|
|||
|
||||
Widget deleteWallet(BuildContext context,
|
||||
WalletOptionsProvider walletProvider, int currentChest) {
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
|
||||
final defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
import 'package:gecko/globals.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/wallet_view.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
class WalletsHome extends StatelessWidget {
|
||||
const WalletsHome({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context);
|
||||
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||
HomeProvider homeProvider =
|
||||
Provider.of<HomeProvider>(context, listen: false);
|
||||
|
||||
final int currentChestNumber = myWalletProvider.getCurrentChest();
|
||||
final currentChestNumber = myWalletProvider.getCurrentChest();
|
||||
final ChestData currentChest = chestBox.get(currentChestNumber)!;
|
||||
myWalletProvider.listWallets =
|
||||
myWalletProvider.readAllWallets(currentChestNumber);
|
||||
|
@ -90,7 +89,7 @@ class WalletsHome extends StatelessWidget {
|
|||
final bool isSameAddress =
|
||||
myWalletProvider.dragAddress == myWalletProvider.lastFlyBy;
|
||||
|
||||
final double screenWidth = MediaQuery.of(homeContext).size.width;
|
||||
final screenWidth = MediaQuery.of(homeContext).size.width;
|
||||
return Container(
|
||||
color: yellowC,
|
||||
width: screenWidth,
|
||||
|
@ -109,8 +108,7 @@ class WalletsHome extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
|
||||
Widget chestOptions(
|
||||
BuildContext context, MyWalletsProvider myWalletProvider) {
|
||||
Widget chestOptions(BuildContext context, final myWalletProvider) {
|
||||
return Column(children: [
|
||||
const SizedBox(height: 50),
|
||||
SizedBox(
|
||||
|
@ -141,28 +139,39 @@ class WalletsHome extends StatelessWidget {
|
|||
),
|
||||
)),
|
||||
const SizedBox(height: 30),
|
||||
InkWell(
|
||||
key: keyImportG1v1,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const ImportG1v1();
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 400,
|
||||
height: 60,
|
||||
child: Center(
|
||||
child: Text('importG1v1'.tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
color: Colors.blue[900],
|
||||
fontWeight: FontWeight.w500))),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
'assets/cesium_bw2.svg',
|
||||
semanticsLabel: 'CS',
|
||||
height: 50,
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
InkWell(
|
||||
key: keyImportG1v1,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const ImportG1v1();
|
||||
}),
|
||||
);
|
||||
},
|
||||
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(
|
||||
key: keyChangeChest,
|
||||
onTap: () {
|
||||
|
@ -189,12 +198,11 @@ class WalletsHome extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget myWalletsTiles(BuildContext context, int currentChestNumber) {
|
||||
MyWalletsProvider myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context);
|
||||
WalletOptionsProvider walletOptions =
|
||||
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||
final walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||
final bool isWalletsExists = myWalletProvider.checkIfWalletExist();
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
|
||||
if (!isWalletsExists) {
|
||||
return const Text('');
|
||||
|
@ -213,7 +221,7 @@ class WalletsHome extends StatelessWidget {
|
|||
|
||||
List listWallets = myWalletProvider.listWallets;
|
||||
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
final double screenWidth = MediaQuery.of(context).size.width;
|
||||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
int nTule = 2;
|
||||
|
||||
if (screenWidth >= 900) {
|
||||
|
@ -397,10 +405,9 @@ class WalletsHome extends StatelessWidget {
|
|||
|
||||
Widget nameBuilder(BuildContext context, WalletData repository,
|
||||
WalletData defaultWallet, int currentChestNumber) {
|
||||
WalletOptionsProvider walletOptions =
|
||||
final walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context, listen: false);
|
||||
DuniterIndexer duniterIndexer =
|
||||
Provider.of<DuniterIndexer>(context, listen: false);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
return ListTile(
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(bottom: Radius.circular(12))),
|
||||
|
@ -436,8 +443,7 @@ class WalletsHome extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget addNewDerivation(context) {
|
||||
MyWalletsProvider myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context);
|
||||
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||
|
||||
String newDerivationName =
|
||||
'${'wallet'.tr()} ${myWalletProvider.listWallets.last.number! + 2}';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
|
@ -19,15 +19,11 @@ class ContactsScreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
CesiumPlusProvider cesiumPlusProvider =
|
||||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
||||
WalletsProfilesProvider walletsProfilesClass =
|
||||
Provider.of<WalletsProfilesProvider>(context, listen: true);
|
||||
HomeProvider homeProvider =
|
||||
Provider.of<HomeProvider>(context, listen: false);
|
||||
DuniterIndexer duniterIndexer =
|
||||
Provider.of<DuniterIndexer>(context, listen: false);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
|
||||
double avatarSize = 55;
|
||||
|
||||
|
@ -74,8 +70,7 @@ class ContactsScreen extends StatelessWidget {
|
|||
key: keySearchResult('keyID++'),
|
||||
horizontalTitleGap: 40,
|
||||
contentPadding: const EdgeInsets.all(5),
|
||||
leading: cesiumPlusProvider
|
||||
.defaultAvatar(avatarSize),
|
||||
leading: defaultAvatar(avatarSize),
|
||||
title: Row(children: <Widget>[
|
||||
Text(getShortPubkey(g1Wallet.address),
|
||||
style: const TextStyle(
|
||||
|
@ -117,10 +112,10 @@ class ContactsScreen extends StatelessWidget {
|
|||
g1Wallet.address;
|
||||
return WalletViewScreen(
|
||||
address: g1Wallet.address,
|
||||
username: g1WalletsBox
|
||||
.get(g1Wallet.address)
|
||||
?.id
|
||||
?.username,
|
||||
username:
|
||||
duniterIndexer.walletNameIndexer[
|
||||
g1Wallet.address] ??
|
||||
'',
|
||||
avatar: g1WalletsBox
|
||||
.get(g1Wallet.address)
|
||||
?.avatar,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// ignore_for_file: file_names
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/screens/common_elements.dart';
|
||||
|
@ -11,7 +11,6 @@ class OnboardingStepOne extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
CommonElements common = CommonElements();
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import 'dart:async';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
|
@ -29,13 +29,11 @@ class OnboardingStepTen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
GenerateWalletsProvider generateWalletProvider =
|
||||
final generateWalletProvider =
|
||||
Provider.of<GenerateWalletsProvider>(context);
|
||||
WalletOptionsProvider walletOptions =
|
||||
Provider.of<WalletOptionsProvider>(context);
|
||||
final walletOptions = Provider.of<WalletOptionsProvider>(context);
|
||||
CommonElements common = CommonElements();
|
||||
final int pinLenght = generateWalletProvider.pin.text.length;
|
||||
final pinLenght = generateWalletProvider.pin.text.length;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
|
@ -132,20 +130,19 @@ class OnboardingStepTen extends StatelessWidget {
|
|||
));
|
||||
}
|
||||
|
||||
Widget pinForm(context, WalletOptionsProvider walletOptions, pinLenght,
|
||||
int walletNbr, int derivation) {
|
||||
Widget pinForm(
|
||||
context, final walletOptions, pinLenght, int walletNbr, int derivation) {
|
||||
// var _walletPin = '';
|
||||
// ignore: close_sinks
|
||||
StreamController<ErrorAnimationType> errorController =
|
||||
StreamController<ErrorAnimationType>();
|
||||
TextEditingController enterPin = TextEditingController();
|
||||
MyWalletsProvider myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context);
|
||||
GenerateWalletsProvider generateWalletProvider =
|
||||
final myWalletProvider = Provider.of<MyWalletsProvider>(context);
|
||||
final generateWalletProvider =
|
||||
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(
|
||||
key: formKey,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ignore_for_file: file_names
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
|
@ -12,7 +12,6 @@ class OnboardingStepEleven extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
CommonElements common = CommonElements();
|
||||
|
||||
return Scaffold(
|
||||
|
@ -59,22 +58,8 @@ Widget finishButton(BuildContext context) {
|
|||
backgroundColor: orangeC, // foreground
|
||||
),
|
||||
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(
|
||||
context, '/mywallets', (route) => route.isFirst);
|
||||
|
||||
// Navigator.pushNamedAndRemoveUntil(
|
||||
// homeContext, '/mywallets', ModalRoute.withName('/'));
|
||||
context, '/mywallets', ModalRoute.withName('/'));
|
||||
},
|
||||
child: Text("accessMyChest".tr(),
|
||||
style:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ignore_for_file: file_names
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/screens/common_elements.dart';
|
||||
|
@ -12,7 +12,6 @@ class OnboardingStepTwo extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
CommonElements common = CommonElements();
|
||||
|
||||
return Scaffold(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ignore_for_file: file_names
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/screens/common_elements.dart';
|
||||
|
@ -12,7 +12,6 @@ class OnboardingStepThree extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
CommonElements common = CommonElements();
|
||||
|
||||
return Scaffold(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// ignore_for_file: file_names
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/screens/common_elements.dart';
|
||||
|
@ -12,7 +12,6 @@ class OnboardingStepFor extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
CommonElements common = CommonElements();
|
||||
|
||||
return Scaffold(
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
// ignore_for_file: file_names
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
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/generate_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/onBoarding/6.dart';
|
||||
import 'package:printing/printing.dart';
|
||||
|
@ -29,8 +31,7 @@ class OnboardingStepFive extends StatefulWidget {
|
|||
class _ChooseChestState extends State<OnboardingStepFive> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
GenerateWalletsProvider generateWalletProvider =
|
||||
final generateWalletProvider =
|
||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||
|
||||
final CommonElements common = CommonElements();
|
||||
|
@ -58,20 +59,57 @@ class _ChooseChestState extends State<OnboardingStepFive> {
|
|||
SizedBox(height: 35 * ratio),
|
||||
sentanceArray(context),
|
||||
SizedBox(height: 17 * ratio),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return PrintWallet(
|
||||
generateWalletProvider.generatedMnemonic);
|
||||
}),
|
||||
);
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/printer.png',
|
||||
height: 42 * ratio,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
// const SizedBox(height: 10),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return PrintWallet(
|
||||
generateWalletProvider.generatedMnemonic);
|
||||
}),
|
||||
);
|
||||
},
|
||||
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),
|
||||
Expanded(
|
||||
|
@ -112,7 +150,7 @@ class _ChooseChestState extends State<OnboardingStepFive> {
|
|||
}
|
||||
|
||||
Widget sentanceArray(BuildContext context) {
|
||||
GenerateWalletsProvider generateWalletProvider =
|
||||
final generateWalletProvider =
|
||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||
|
||||
return Padding(
|
||||
|
@ -189,7 +227,7 @@ class PrintWallet extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
GenerateWalletsProvider generateWalletProvider =
|
||||
final generateWalletProvider =
|
||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
|
@ -222,9 +260,9 @@ class PrintWallet extends StatelessWidget {
|
|||
|
||||
Widget nextButton(
|
||||
BuildContext context, String text, bool isFast, bool skipIntro) {
|
||||
GenerateWalletsProvider generateWalletProvider =
|
||||
final generateWalletProvider =
|
||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
return SizedBox(
|
||||
width: 380 * ratio,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// ignore_for_file: must_be_immutable
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
|
@ -24,8 +24,7 @@ class OnboardingStepSix extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
GenerateWalletsProvider generateWalletProvider =
|
||||
final generateWalletProvider =
|
||||
Provider.of<GenerateWalletsProvider>(context, listen: true);
|
||||
|
||||
CommonElements common = CommonElements();
|
||||
|
@ -145,7 +144,7 @@ class OnboardingStepSix extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget nextButton(BuildContext context, String text, nextScreen, bool isFast) {
|
||||
GenerateWalletsProvider generateWalletProvider =
|
||||
final generateWalletProvider =
|
||||
Provider.of<GenerateWalletsProvider>(context, listen: false);
|
||||
|
||||
generateWalletProvider.isAskedWordValid = false;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// ignore_for_file: file_names
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/screens/common_elements.dart';
|
||||
|
@ -13,7 +13,6 @@ class OnboardingStepSeven extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
CommonElements common = CommonElements();
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// ignore_for_file: file_names
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/screens/common_elements.dart';
|
||||
|
@ -13,7 +13,6 @@ class OnboardingStepEight extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
CommonElements common = CommonElements();
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// ignore_for_file: file_names
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
|
@ -16,10 +16,9 @@ class OnboardingStepNine extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
GenerateWalletsProvider generateWalletProvider =
|
||||
final generateWalletProvider =
|
||||
Provider.of<GenerateWalletsProvider>(context);
|
||||
// MyWalletsProvider myWalletProvider =
|
||||
// final myWalletProvider =
|
||||
// Provider.of<MyWalletsProvider>(context);
|
||||
CommonElements common = CommonElements();
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
// ignore_for_file: must_be_immutable
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
|
@ -17,7 +16,6 @@ class QrCodeFullscreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
|
@ -16,11 +16,8 @@ class SearchScreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
SearchProvider searchProvider = Provider.of<SearchProvider>(context);
|
||||
final double screenHeight = MediaQuery.of(context).size.height;
|
||||
// HomeProvider _homeProvider =
|
||||
// Provider.of<HomeProvider>(context, listen: false);
|
||||
final searchProvider = Provider.of<SearchProvider>(context);
|
||||
final screenHeight = MediaQuery.of(context).size.height;
|
||||
|
||||
return WillPopScope(
|
||||
onWillPop: () {
|
||||
|
@ -52,6 +49,17 @@ class SearchScreen extends StatelessWidget {
|
|||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 17),
|
||||
child: TextField(
|
||||
onSubmitted: searchProvider.searchController.text.length >= 2
|
||||
? (_) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return const SearchResultScreen();
|
||||
}),
|
||||
);
|
||||
}
|
||||
: (value) {},
|
||||
textInputAction: TextInputAction.search,
|
||||
key: keySearchField,
|
||||
controller: searchProvider.searchController,
|
||||
autofocus: true,
|
||||
|
@ -90,8 +98,8 @@ class SearchScreen extends StatelessWidget {
|
|||
),
|
||||
const Spacer(flex: 1),
|
||||
SizedBox(
|
||||
width: 410,
|
||||
height: 70,
|
||||
width: 320,
|
||||
height: 90,
|
||||
child: ElevatedButton(
|
||||
key: keyConfirmSearch,
|
||||
style: ElevatedButton.styleFrom(
|
||||
|
@ -110,8 +118,9 @@ class SearchScreen extends StatelessWidget {
|
|||
: null,
|
||||
child: Text(
|
||||
'search'.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
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:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
|
@ -20,17 +20,12 @@ class SearchResultScreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
SearchProvider searchProvider =
|
||||
Provider.of<SearchProvider>(context, listen: false);
|
||||
CesiumPlusProvider cesiumPlusProvider =
|
||||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
||||
final searchProvider = Provider.of<SearchProvider>(context, listen: false);
|
||||
WalletsProfilesProvider walletsProfilesClass =
|
||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||
HomeProvider homeProvider =
|
||||
Provider.of<HomeProvider>(context, listen: false);
|
||||
DuniterIndexer duniterIndexer =
|
||||
Provider.of<DuniterIndexer>(context, listen: false);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
|
||||
double avatarSize = 55;
|
||||
|
||||
|
@ -83,7 +78,6 @@ class SearchResultScreen extends StatelessWidget {
|
|||
if (snapshot.data?.isEmpty ?? true) {
|
||||
return duniterIndexer.searchIdentity(
|
||||
context, searchProvider.searchController.text);
|
||||
|
||||
// const Text('Aucun résultat');
|
||||
} else {
|
||||
return Expanded(
|
||||
|
@ -97,8 +91,7 @@ class SearchResultScreen extends StatelessWidget {
|
|||
key: keySearchResult(g1Wallet.address),
|
||||
horizontalTitleGap: 40,
|
||||
contentPadding: const EdgeInsets.all(5),
|
||||
leading: cesiumPlusProvider
|
||||
.defaultAvatar(avatarSize),
|
||||
leading: defaultAvatar(avatarSize),
|
||||
title: Row(children: <Widget>[
|
||||
Text(getShortPubkey(g1Wallet.address),
|
||||
style: const TextStyle(
|
||||
|
@ -144,10 +137,10 @@ class SearchResultScreen extends StatelessWidget {
|
|||
g1Wallet.address;
|
||||
return WalletViewScreen(
|
||||
address: g1Wallet.address,
|
||||
username: g1WalletsBox
|
||||
.get(g1Wallet.address)
|
||||
?.id
|
||||
?.username,
|
||||
username: duniterIndexer
|
||||
.walletNameIndexer[
|
||||
g1Wallet.address] ??
|
||||
'',
|
||||
avatar: g1WalletsBox
|
||||
.get(g1Wallet.address)
|
||||
?.avatar,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/duniter_indexer.dart';
|
||||
import 'package:gecko/providers/home.dart';
|
||||
|
@ -18,8 +18,6 @@ class SettingsScreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
|
||||
const double buttonHigh = 50;
|
||||
const double buttonWidth = 240;
|
||||
const double fontSize = 16;
|
||||
|
@ -110,7 +108,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget duniterEndpointSelection(BuildContext context) {
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
String? selectedDuniterEndpoint;
|
||||
|
||||
// List of items in our dropdown menu
|
||||
|
@ -271,8 +269,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
}
|
||||
|
||||
Widget indexerEndpointSelection(BuildContext context) {
|
||||
DuniterIndexer indexer =
|
||||
Provider.of<DuniterIndexer>(context, listen: false);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
|
||||
String? selectedIndexerEndpoint;
|
||||
if (configBox.containsKey('customIndexer')) {
|
||||
|
@ -282,7 +279,7 @@ class SettingsScreen extends StatelessWidget {
|
|||
}
|
||||
|
||||
if (selectedIndexerEndpoint == '') {
|
||||
selectedIndexerEndpoint = indexer.listIndexerEndpoints[0];
|
||||
selectedIndexerEndpoint = duniterIndexer.listIndexerEndpoints[0];
|
||||
}
|
||||
|
||||
TextEditingController indexerEndpointController = TextEditingController(
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import 'package:flutter/services.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
@ -7,8 +6,7 @@ class TemplateScreen extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
// HomeProvider _homeProvider = Provider.of<HomeProvider>(context);
|
||||
// final _homeProvider = Provider.of<HomeProvider>(context);
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
|
@ -20,11 +20,10 @@ class TransactionInProgress extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: true);
|
||||
WalletsProfilesProvider walletViewProvider =
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: true);
|
||||
final walletProfiles =
|
||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
bool isValid = false;
|
||||
|
||||
|
@ -35,11 +34,11 @@ class TransactionInProgress extends StatelessWidget {
|
|||
|
||||
// sub.spawnBlock();
|
||||
|
||||
log.d(walletViewProvider.address);
|
||||
log.d(walletProfiles.address);
|
||||
|
||||
final from = fromAddress ?? myWalletProvider.getDefaultWallet().name!;
|
||||
final to = toAddress ?? getShortPubkey(walletViewProvider.address);
|
||||
final amount = walletViewProvider.payAmount.text;
|
||||
final to = toAddress ?? getShortPubkey(walletProfiles.address);
|
||||
final amount = walletProfiles.payAmount.text;
|
||||
String actionName = '';
|
||||
final bool isUdUnit = configBox.get('isUdUnit') ?? false;
|
||||
|
||||
|
|
|
@ -2,11 +2,13 @@
|
|||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.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/duniter_indexer.dart';
|
||||
import 'package:gecko/providers/home.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.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/qrcode_fullscreen.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:qr_flutter/qr_flutter.dart';
|
||||
|
||||
class WalletViewScreen extends StatelessWidget {
|
||||
const WalletViewScreen(
|
||||
{required this.address, this.username, this.avatar, Key? key})
|
||||
{required this.address, required this.username, this.avatar, Key? key})
|
||||
: super(key: key);
|
||||
final String address;
|
||||
final String? username;
|
||||
final String username;
|
||||
final Image? avatar;
|
||||
final double buttonSize = 100;
|
||||
final double buttonFontSize = 18;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
WalletsProfilesProvider walletProfile =
|
||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||
CesiumPlusProvider cesiumPlusProvider =
|
||||
Provider.of<CesiumPlusProvider>(context, listen: false);
|
||||
walletProfile.address = address;
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
HomeProvider homeProvider =
|
||||
Provider.of<HomeProvider>(context, listen: false);
|
||||
MyWalletsProvider myWalletProvider =
|
||||
final myWalletProvider =
|
||||
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
|
||||
sub.setCurrentWallet(defaultWallet);
|
||||
|
||||
log.d('aaaaaaaaaaaaaaaaaaa: $username');
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
resizeToAvoidBottomInset: true,
|
||||
|
@ -100,15 +104,21 @@ class WalletViewScreen extends StatelessWidget {
|
|||
)
|
||||
],
|
||||
title: SizedBox(
|
||||
height: 22,
|
||||
child: Text('seeAWallet'.tr()),
|
||||
),
|
||||
height: 22,
|
||||
child: Text(duniterIndexer
|
||||
.walletNameIndexer[walletProfile.address] ==
|
||||
null
|
||||
? 'seeAWallet'.tr()
|
||||
: 'memberAccountOf'.tr(args: [
|
||||
duniterIndexer.walletNameIndexer[walletProfile.address] ??
|
||||
'?'
|
||||
]))),
|
||||
),
|
||||
bottomNavigationBar: homeProvider.bottomAppBar(context),
|
||||
body: SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
walletProfile.headerProfileView(context, address, username),
|
||||
SizedBox(height: isTall ? 10 : 0),
|
||||
HeaderProfile(address: address, username: username),
|
||||
SizedBox(height: isTall ? 30 : 15),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
|
||||
Column(children: <Widget>[
|
||||
SizedBox(
|
||||
|
@ -128,11 +138,10 @@ class WalletViewScreen extends StatelessWidget {
|
|||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
PageNoTransit(builder: (context) {
|
||||
return ActivityScreen(
|
||||
address: address,
|
||||
avatar:
|
||||
cesiumPlusProvider.defaultAvatar(50));
|
||||
avatar: defaultAvatar(50));
|
||||
}),
|
||||
);
|
||||
}),
|
||||
|
@ -149,6 +158,8 @@ class WalletViewScreen extends StatelessWidget {
|
|||
]),
|
||||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
||||
final duniterIndexer =
|
||||
Provider.of<DuniterIndexer>(context, listen: false);
|
||||
return FutureBuilder(
|
||||
future: sub.certState(defaultWallet.address!, address),
|
||||
builder: (context, AsyncSnapshot<Map<String, int>> snapshot) {
|
||||
|
@ -162,8 +173,8 @@ class WalletViewScreen extends StatelessWidget {
|
|||
final Duration durationSeconds = Duration(
|
||||
seconds: snapshot.data!['certDelay'] ??
|
||||
snapshot.data!['certRenewable']!);
|
||||
final int seconds = durationSeconds.inSeconds;
|
||||
final int minutes = durationSeconds.inMinutes;
|
||||
final seconds = durationSeconds.inSeconds;
|
||||
final minutes = durationSeconds.inMinutes;
|
||||
|
||||
if (seconds <= 0) {
|
||||
duration = 'seconds'.tr(args: ['0']);
|
||||
|
@ -172,8 +183,8 @@ class WalletViewScreen extends StatelessWidget {
|
|||
} else if (seconds <= 3600) {
|
||||
duration = 'minutes'.tr(args: [minutes.toString()]);
|
||||
} else if (seconds <= 86400) {
|
||||
final int hours = durationSeconds.inHours;
|
||||
final int minutesLeft = minutes - hours * 60;
|
||||
final hours = durationSeconds.inHours;
|
||||
final minutesLeft = minutes - hours * 60;
|
||||
String showMinutes = '';
|
||||
if (minutesLeft < 60) {}
|
||||
showMinutes =
|
||||
|
@ -181,11 +192,10 @@ class WalletViewScreen extends StatelessWidget {
|
|||
duration =
|
||||
'hours'.tr(args: [hours.toString(), showMinutes]);
|
||||
} else if (seconds <= 2592000) {
|
||||
final int days = durationSeconds.inDays;
|
||||
final days = durationSeconds.inDays;
|
||||
duration = 'days'.tr(args: [days.toString()]);
|
||||
} else {
|
||||
final int months =
|
||||
(durationSeconds.inDays / 30).round();
|
||||
final months = (durationSeconds.inDays / 30).round();
|
||||
duration = 'months'.tr(args: [months.toString()]);
|
||||
}
|
||||
}
|
||||
|
@ -213,12 +223,18 @@ class WalletViewScreen extends StatelessWidget {
|
|||
'assets/gecko_certify.png')),
|
||||
),
|
||||
onTap: () async {
|
||||
final bool? result = await confirmPopup(
|
||||
context,
|
||||
"areYouSureYouWantToCertify".tr(
|
||||
args: [
|
||||
getShortPubkey(address)
|
||||
]));
|
||||
final bool? result =
|
||||
await confirmPopupCertification(
|
||||
context,
|
||||
'areYouSureYouWantToCertify1'
|
||||
.tr(),
|
||||
duniterIndexer
|
||||
.walletNameIndexer[
|
||||
address] ??
|
||||
"noIdentity".tr(),
|
||||
'areYouSureYouWantToCertify2'
|
||||
.tr(),
|
||||
getShortPubkey(address));
|
||||
|
||||
if (result ?? false) {
|
||||
String? pin;
|
||||
|
@ -262,7 +278,9 @@ class WalletViewScreen extends StatelessWidget {
|
|||
),
|
||||
const SizedBox(height: 9),
|
||||
Text(
|
||||
"certify".tr(),
|
||||
toStatus == 0
|
||||
? "certify".tr()
|
||||
: "createIdentity".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: buttonFontSize,
|
||||
|
@ -422,9 +440,7 @@ void paymentPopup(BuildContext context, String toAddress) {
|
|||
log.d(pin);
|
||||
if (pin != null || myWalletProvider.pinCode != '') {
|
||||
// Payment workflow !
|
||||
WalletsProfilesProvider walletViewProvider =
|
||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||
final acc = sub.getCurrentWallet();
|
||||
log.d(
|
||||
"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"
|
||||
source: hosted
|
||||
version: "50.0.0"
|
||||
accordion:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: accordion
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.5.1"
|
||||
analyzer:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -50,13 +57,6 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.9.0"
|
||||
auth_header:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: auth_header
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
barcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -71,6 +71,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.2.1"
|
||||
bip32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: bip32
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
bip32_ed25519:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -78,6 +85,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.2"
|
||||
bip39:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: bip39
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.6"
|
||||
bip39_multi_nullsafety:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -92,6 +106,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
bs58check:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: bs58check
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
bubble:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -273,7 +294,7 @@ packages:
|
|||
name: dart_code_metrics
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.0.1"
|
||||
version: "5.1.0"
|
||||
dart_style:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -288,6 +309,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.7.8"
|
||||
decimal:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: decimal
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -323,6 +351,20 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -331,7 +373,7 @@ packages:
|
|||
source: hosted
|
||||
version: "1.3.1"
|
||||
fast_base58:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fast_base58
|
||||
url: "https://pub.dartlang.org"
|
||||
|
@ -395,7 +437,7 @@ packages:
|
|||
name: flutter_inappwebview
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.3.2"
|
||||
version: "5.7.2+2"
|
||||
flutter_lints:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -422,6 +464,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
|
@ -515,7 +564,7 @@ packages:
|
|||
source: hosted
|
||||
version: "0.2.2+1"
|
||||
graphql:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: graphql
|
||||
url: "https://pub.dartlang.org"
|
||||
|
@ -584,13 +633,6 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
@ -680,27 +722,6 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -722,6 +743,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -777,7 +805,7 @@ packages:
|
|||
name: mime
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.0.3"
|
||||
mobx:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -834,6 +862,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -890,13 +925,6 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.3"
|
||||
path_tree:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_tree
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
pdf:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -954,7 +982,7 @@ packages:
|
|||
source: hosted
|
||||
version: "7.4.0"
|
||||
pinenacl:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: pinenacl
|
||||
url: "https://pub.dartlang.org"
|
||||
|
@ -985,11 +1013,11 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: gecko-unwrapbytes
|
||||
resolved-ref: b019cc2a6e77b6989f94b1bef8259298410cd82a
|
||||
ref: d45eb8d787d625331e6425df5cec9c5d33b30d35
|
||||
resolved-ref: d45eb8d787d625331e6425df5cec9c5d33b30d35
|
||||
url: "https://github.com/poka-IT/sdk.git"
|
||||
source: git
|
||||
version: "0.4.8"
|
||||
version: "0.5.0"
|
||||
pool:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1062,6 +1090,13 @@ packages:
|
|||
url: "https://github.com/insinfo/qr.flutter.git"
|
||||
source: git
|
||||
version: "4.0.0"
|
||||
rational:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: rational
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
responsive_framework:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -1076,20 +1111,34 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: sentry
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.16.1"
|
||||
version: "6.17.0"
|
||||
sentry_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sentry_flutter
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.16.1"
|
||||
version: "6.17.0"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -1256,6 +1305,62 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1284,6 +1389,13 @@ packages:
|
|||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
web3dart:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web3dart
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.5.1"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
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.
|
||||
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:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
|
@ -18,7 +18,7 @@ dependencies:
|
|||
bubble: ^1.2.1
|
||||
carousel_slider: ^4.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
graphql_flutter: ^5.1.1-beta.3
|
||||
graphql_flutter: ^5.1.1-beta.4
|
||||
hive_flutter: ^1.1.0
|
||||
image_picker: ^0.8.4
|
||||
jdenticon_dart: ^2.0.0
|
||||
|
@ -48,7 +48,8 @@ dependencies:
|
|||
# ref: develop
|
||||
url: https://github.com/poka-IT/sdk.git
|
||||
# ref: gecko-old
|
||||
ref: gecko-unwrapbytes
|
||||
# ref: ec61ebab45287315fa1d7e84830a01d6e23891ae
|
||||
ref: d45eb8d787d625331e6425df5cec9c5d33b30d35
|
||||
dots_indicator: ^2.1.0
|
||||
connectivity_plus: ^2.3.3
|
||||
image_cropper: ^3.0.0
|
||||
|
@ -57,6 +58,11 @@ dependencies:
|
|||
pointycastle: ^3.6.1
|
||||
hex: ^0.2.0
|
||||
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:
|
||||
# flutter_launcher_icons: ^0.9.2
|
||||
|
|
Loading…
Reference in New Issue