Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ğecko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Ğecko
Commits
c840753f
Commit
c840753f
authored
2 years ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
identity migration is working
parent
99f939d5
No related branches found
No related tags found
1 merge request
!27
Import cs accounts
Pipeline
#16844
failed
2 years ago
Stage: format
Stage: build_and_test
Stage: package
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/providers/substrate_sdk.dart
+25
-13
25 additions, 13 deletions
lib/providers/substrate_sdk.dart
pubspec.lock
+2
-2
2 additions, 2 deletions
pubspec.lock
pubspec.yaml
+2
-1
2 additions, 1 deletion
pubspec.yaml
with
29 additions
and
16 deletions
lib/providers/substrate_sdk.dart
+
25
−
13
View file @
c840753f
...
@@ -598,7 +598,7 @@ class SubstrateSdk with ChangeNotifier {
...
@@ -598,7 +598,7 @@ class SubstrateSdk with ChangeNotifier {
return
await
sdk
.
api
.
keyring
.
checkMnemonicValid
(
mnemonic
);
return
await
sdk
.
api
.
keyring
.
checkMnemonicValid
(
mnemonic
);
}
}
Future
csToV2Address
(
String
salt
,
String
password
)
async
{
Future
<
String
>
csToV2Address
(
String
salt
,
String
password
)
async
{
final
scrypt
=
pc
.
KeyDerivator
(
'scrypt'
);
final
scrypt
=
pc
.
KeyDerivator
(
'scrypt'
);
scrypt
.
init
(
scrypt
.
init
(
...
@@ -621,6 +621,7 @@ class SubstrateSdk with ChangeNotifier {
...
@@ -621,6 +621,7 @@ class SubstrateSdk with ChangeNotifier {
g1V1NewAddress
=
newAddress
.
address
!
;
g1V1NewAddress
=
newAddress
.
address
!
;
notifyListeners
();
notifyListeners
();
return
g1V1NewAddress
;
}
}
Future
<
List
>
getBalanceAndIdtyStatus
(
String
address
,
String
myAddress
)
async
{
Future
<
List
>
getBalanceAndIdtyStatus
(
String
address
,
String
myAddress
)
async
{
...
@@ -801,7 +802,8 @@ class SubstrateSdk with ChangeNotifier {
...
@@ -801,7 +802,8 @@ class SubstrateSdk with ChangeNotifier {
{
required
String
fromAddress
,
{
required
String
fromAddress
,
required
String
destAddress
,
required
String
destAddress
,
required
String
formPassword
,
required
String
formPassword
,
required
String
destPassword
})
async
{
required
String
destPassword
,
bool
withBalance
=
false
})
async
{
transactionStatus
=
''
;
transactionStatus
=
''
;
final
fromPubkey
=
await
sdk
.
api
.
account
.
decodeAddress
([
fromAddress
]);
final
fromPubkey
=
await
sdk
.
api
.
account
.
decodeAddress
([
fromAddress
]);
final
sender
=
TxSenderData
(
final
sender
=
TxSenderData
(
...
@@ -840,19 +842,28 @@ messageToSign: $messageToSign
...
@@ -840,19 +842,28 @@ messageToSign: $messageToSign
messageToSignHex:
$messageToSignHex
messageToSignHex:
$messageToSignHex
newKeySig:
$newKeySig
"""
);
newKeySig:
$newKeySig
"""
);
txInfo
=
TxInfoData
(
if
(
withBalance
)
{
'identity'
,
txInfo
=
TxInfoData
(
'changeOwnerKey'
,
'utility'
,
sender
,
'batchAll'
,
);
sender
,
);
txOptions
=
[
destAddress
,
newKeySig
];
const
tx1
=
'api.tx.universalDividend.claimUds()'
;
final
tx2
=
'api.tx.identity.changeOwnerKey("
$destAddress
", "
$newKeySig
")'
;
const
tx3
=
'api.tx.balances.transferAll(false)'
;
// const tx1 = 'api.tx.universalDividend.claimUds()';
rawParams
=
'[[
$tx1
,
$tx2
,
$tx3
]]'
;
// final tx2 = 'api.tx.identity.changeOwnerKey("$destAddress", "$newKeySig")';
}
else
{
// const tx3 = 'api.tx.balances.transferAll(false)';
txInfo
=
TxInfoData
(
'identity'
,
'changeOwnerKey'
,
sender
,
);
// rawParams = '[[$tx1, $tx2, $tx3]]';
txOptions
=
[
destAddress
,
newKeySig
];
}
return
await
_executeCall
(
txInfo
,
txOptions
,
formPassword
,
rawParams
);
return
await
_executeCall
(
txInfo
,
txOptions
,
formPassword
,
rawParams
);
}
}
...
@@ -918,7 +929,8 @@ newKeySig: $newKeySig""");
...
@@ -918,7 +929,8 @@ newKeySig: $newKeySig""");
fromAddress:
keypair
.
address
!
,
fromAddress:
keypair
.
address
!
,
destAddress:
destAddress
,
destAddress:
destAddress
,
formPassword:
'password'
,
formPassword:
'password'
,
destPassword:
destPassword
);
destPassword:
destPassword
,
withBalance:
true
);
}
else
if
(
balance
!=
0
)
{
}
else
if
(
balance
!=
0
)
{
await
pay
(
await
pay
(
fromAddress:
keypair
.
address
!
,
fromAddress:
keypair
.
address
!
,
...
...
This diff is collapsed.
Click to expand it.
pubspec.lock
+
2
−
2
View file @
c840753f
...
@@ -1062,8 +1062,8 @@ packages:
...
@@ -1062,8 +1062,8 @@ packages:
dependency: "direct main"
dependency: "direct main"
description:
description:
path: "."
path: "."
ref: gecko-
old
ref: gecko-
unwrapbytes
resolved-ref:
"87096351fb187614b6386343615db39a2f2b5b9b"
resolved-ref:
b019cc2a6e77b6989f94b1bef8259298410cd82a
url: "https://github.com/poka-IT/sdk.git"
url: "https://github.com/poka-IT/sdk.git"
source: git
source: git
version: "0.4.8"
version: "0.4.8"
...
...
This diff is collapsed.
Click to expand it.
pubspec.yaml
+
2
−
1
View file @
c840753f
...
@@ -65,7 +65,8 @@ dependencies:
...
@@ -65,7 +65,8 @@ dependencies:
# url: https://github.com/polkawallet-io/sdk.git
# url: https://github.com/polkawallet-io/sdk.git
# ref: develop
# ref: develop
url
:
https://github.com/poka-IT/sdk.git
url
:
https://github.com/poka-IT/sdk.git
ref
:
gecko-old
# ref: gecko-old
ref
:
gecko-unwrapbytes
dots_indicator
:
^2.1.0
dots_indicator
:
^2.1.0
web_socket_channel
:
^2.2.0
web_socket_channel
:
^2.2.0
connectivity_plus
:
^2.3.3
connectivity_plus
:
^2.3.3
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment