fix: can add custom derivation
This commit is contained in:
parent
bfce822b17
commit
5950088bca
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"initial_monetary_mass": 60100,
|
"initial_monetary_mass": 80100,
|
||||||
"identities": {
|
"identities": {
|
||||||
"test1": {
|
"test1": {
|
||||||
"index": 0,
|
"index": 0,
|
||||||
|
@ -61,11 +61,21 @@
|
||||||
},
|
},
|
||||||
"owner_pubkey": "6FgzG8NwatTWHo7rM7sPP6P4Q95R2ZQNqYiHCs38RT21"
|
"owner_pubkey": "6FgzG8NwatTWHo7rM7sPP6P4Q95R2ZQNqYiHCs38RT21"
|
||||||
},
|
},
|
||||||
"testCesium1": {
|
"test6": {
|
||||||
"index": 5,
|
"index": 5,
|
||||||
"balance": 10000,
|
"balance": 10000,
|
||||||
"membership_expire_on": 1705509948,
|
"membership_expire_on": 1705509948,
|
||||||
"next_cert_issuable_on": 1668347505,
|
"next_cert_issuable_on": 1668347505,
|
||||||
|
"certs_received": {
|
||||||
|
"test1": 1727758466
|
||||||
|
},
|
||||||
|
"owner_pubkey": "FZ8URw5rPqpWegWnufpcBDkg6tMpc2JmNZVCuPA9g3nq"
|
||||||
|
},
|
||||||
|
"testCesium1": {
|
||||||
|
"index": 6,
|
||||||
|
"balance": 10000,
|
||||||
|
"membership_expire_on": 1705509948,
|
||||||
|
"next_cert_issuable_on": 1668347505,
|
||||||
"certs_received": {
|
"certs_received": {
|
||||||
"test1": 1727758466,
|
"test1": 1727758466,
|
||||||
"test2": 1727758466,
|
"test2": 1727758466,
|
||||||
|
@ -73,5 +83,8 @@
|
||||||
},
|
},
|
||||||
"owner_pubkey": "DCovzCEnQm9GUWe6mr8u42JR1JAuoj3HbQUGdCkfTzSr"
|
"owner_pubkey": "DCovzCEnQm9GUWe6mr8u42JR1JAuoj3HbQUGdCkfTzSr"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"wallets": {
|
||||||
|
"BPKBoTrrLD1XWmpZdRsfDnDT1M6PBBvgzPxAKNdutVV2": 10000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ const cesiumPod = "https://g1.data.le-sou.org";
|
||||||
// String cesiumPod = "https://g1.data.e-is.pro";
|
// String cesiumPod = "https://g1.data.e-is.pro";
|
||||||
|
|
||||||
const datapodEndpoint = 'gdev-datapod.p2p.legal';
|
const datapodEndpoint = 'gdev-datapod.p2p.legal';
|
||||||
// const v2sDatapod = 'http://10.0.2.2:8080';
|
// const datapodEndpoint = '10.0.2.2:8080';
|
||||||
|
|
||||||
// Contexts
|
// Contexts
|
||||||
late BuildContext homeContext;
|
late BuildContext homeContext;
|
||||||
|
|
|
@ -67,11 +67,14 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
password: myWalletProvider.pinCode);
|
password: myWalletProvider.pinCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
await walletBox.delete(wallet.key);
|
await walletBox.delete(wallet.address);
|
||||||
if (wallet.imageCustomPath != null) {
|
if (wallet.imageCustomPath != null) {
|
||||||
final avatarFile = File(wallet.imageCustomPath!);
|
final avatarFile = File(wallet.imageCustomPath!);
|
||||||
await avatarFile.delete();
|
if (await avatarFile.exists()) {
|
||||||
|
await avatarFile.delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
datapod.deleteProfile(address: wallet.address);
|
datapod.deleteProfile(address: wallet.address);
|
||||||
await sub.deleteAccounts([wallet.address]);
|
await sub.deleteAccounts([wallet.address]);
|
||||||
|
|
||||||
|
|
|
@ -82,8 +82,10 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||||
'wss://$validIndexerEndpoint/v1/graphql',
|
'wss://$validIndexerEndpoint/v1/graphql',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const headerWebsocket =
|
||||||
|
datapodEndpoint == '10.0.2.2:8080' ? 'ws' : 'wss';
|
||||||
final wsLinkDatapod = WebSocketLink(
|
final wsLinkDatapod = WebSocketLink(
|
||||||
'wss://$datapodEndpoint/v1/graphql',
|
'$headerWebsocket://$datapodEndpoint/v1/graphql',
|
||||||
);
|
);
|
||||||
|
|
||||||
duniterIndexer.indexerClient = GraphQLClient(
|
duniterIndexer.indexerClient = GraphQLClient(
|
||||||
|
|
|
@ -122,7 +122,7 @@ class _CustomDerivationState extends State<CustomDerivation> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myWalletProvider.pinCode != '') return;
|
if (myWalletProvider.pinCode == '') return;
|
||||||
String newDerivationName =
|
String newDerivationName =
|
||||||
'${'wallet'.tr()} ${myWalletProvider.listWallets.last.number! + 2}';
|
'${'wallet'.tr()} ${myWalletProvider.listWallets.last.number! + 2}';
|
||||||
if (dropdownValue == 'root') {
|
if (dropdownValue == 'root') {
|
||||||
|
|
|
@ -63,22 +63,45 @@ class HistoryQuery extends StatelessWidget {
|
||||||
}
|
}
|
||||||
final List transactions = result.data?["transaction"];
|
final List transactions = result.data?["transaction"];
|
||||||
|
|
||||||
|
// Get transaction in progress if exist
|
||||||
|
String? transactionId;
|
||||||
|
for (final entry in sub.transactionStatus.entries) {
|
||||||
|
if (entry.value.from == address) {
|
||||||
|
transactionId = entry.key;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (result.hasException) {
|
if (result.hasException) {
|
||||||
log.e('Error Indexer: ${result.exception}');
|
log.e('Error Indexer: ${result.exception}');
|
||||||
return Column(children: <Widget>[
|
return Column(children: <Widget>[
|
||||||
ScaledSizedBox(height: 50),
|
Column(
|
||||||
Text(
|
children: [
|
||||||
"noNetworkNoHistory".tr(),
|
if (transactionId != null)
|
||||||
textAlign: TextAlign.center,
|
TransactionInProgressTule(
|
||||||
style: scaledTextStyle(fontSize: 18),
|
address: address, transactionId: transactionId),
|
||||||
|
ScaledSizedBox(height: 50),
|
||||||
|
Text(
|
||||||
|
"noNetworkNoHistory".tr(),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: scaledTextStyle(fontSize: 18),
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
} else if (transactions.isEmpty) {
|
} else if (transactions.isEmpty) {
|
||||||
return Column(children: <Widget>[
|
return Column(children: <Widget>[
|
||||||
ScaledSizedBox(height: 50),
|
Column(
|
||||||
Text(
|
children: [
|
||||||
"noDataToDisplay".tr(),
|
if (transactionId != null)
|
||||||
style: scaledTextStyle(fontSize: 18),
|
TransactionInProgressTule(
|
||||||
|
address: address, transactionId: transactionId),
|
||||||
|
ScaledSizedBox(height: 50),
|
||||||
|
Text(
|
||||||
|
"noDataToDisplay".tr(),
|
||||||
|
style: scaledTextStyle(fontSize: 18),
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -96,15 +119,6 @@ class HistoryQuery extends StatelessWidget {
|
||||||
offset: transactions.length,
|
offset: transactions.length,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Get transaction in progress if exist
|
|
||||||
String? transactionId;
|
|
||||||
for (final entry in sub.transactionStatus.entries) {
|
|
||||||
if (entry.value.from == address) {
|
|
||||||
transactionId = entry.key;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build history list
|
// Build history list
|
||||||
return NotificationListener(
|
return NotificationListener(
|
||||||
child: Builder(
|
child: Builder(
|
||||||
|
|
|
@ -40,6 +40,7 @@ class _TransactionInProgressTuleState extends State<TransactionInProgressTule> {
|
||||||
txContent = sub.transactionStatus[widget.transactionId]!;
|
txContent = sub.transactionStatus[widget.transactionId]!;
|
||||||
|
|
||||||
subscription = stream.listen((result) {
|
subscription = stream.listen((result) {
|
||||||
|
if (result.data?['account_by_pk'] == null) return;
|
||||||
if (result.hasException) {
|
if (result.hasException) {
|
||||||
log.e(result.exception);
|
log.e(result.exception);
|
||||||
isVisible = true;
|
isVisible = true;
|
||||||
|
@ -128,7 +129,7 @@ class _TransactionInProgressTuleState extends State<TransactionInProgressTule> {
|
||||||
statusIcon,
|
statusIcon,
|
||||||
ScaledSizedBox(width: 10),
|
ScaledSizedBox(width: 10),
|
||||||
ScaledSizedBox(
|
ScaledSizedBox(
|
||||||
width: 160,
|
width: 170,
|
||||||
child: Text(
|
child: Text(
|
||||||
humanStatus,
|
humanStatus,
|
||||||
style: scaledTextStyle(
|
style: scaledTextStyle(
|
||||||
|
|
Loading…
Reference in New Issue