Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cellframe-ui-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
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
cellframe
cellframe-ui-sdk
Commits
31e74b0a
You need to sign in or sign up before continuing.
Commit
31e74b0a
authored
2 months ago
by
Erdem Erdyniev
Browse files
Options
Downloads
Patches
Plain Diff
[*]web3api:GetLedgerHash(): Fixed error parsing from node response
parent
10247aaa
No related branches found
No related tags found
2 merge requests
!293
[+] add new web 3 commands - GetDexOrderList, GetDexPairs, GetDexPairRate
,
!289
bugfix-15119
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
chain/wallet/handlers/DapLedgerTxHashCommand.cpp
+27
-1
27 additions, 1 deletion
chain/wallet/handlers/DapLedgerTxHashCommand.cpp
with
27 additions
and
1 deletion
chain/wallet/handlers/DapLedgerTxHashCommand.cpp
+
27
−
1
View file @
31e74b0a
...
@@ -26,9 +26,35 @@ QVariant DapLedgerTxHashCommand::respondToClient(const QVariant &args)
...
@@ -26,9 +26,35 @@ QVariant DapLedgerTxHashCommand::respondToClient(const QVariant &args)
QJsonObject
resultObj
;
QJsonObject
resultObj
;
QJsonDocument
resultDoc
;
QJsonDocument
resultDoc
;
auto
getErrorMessageFromData
=
[](
const
QJsonObject
&
resultToCheck
){
const
QString
errsCode
=
"errors"
;
const
QString
msgsCode
=
"message"
;
if
(
resultToCheck
.
contains
(
errsCode
)
&&
resultToCheck
[
errsCode
].
isArray
())
{
auto
arr
=
resultToCheck
[
errsCode
].
toArray
();
if
(
!
arr
.
isEmpty
()
&&
arr
[
0
].
isObject
())
{
auto
msgsObj
=
arr
[
0
].
toObject
();
if
(
msgsObj
.
contains
(
msgsCode
)
&&
msgsObj
[
msgsCode
].
isString
())
{
return
msgsObj
[
msgsCode
].
toString
();
}
}
}
return
QString
();
};
if
(
errorMsg
.
isEmpty
())
if
(
errorMsg
.
isEmpty
())
{
{
resultObj
.
insert
(
RESULT_KEY
,
result
);
QString
dataErrMsg
=
getErrorMessageFromData
(
result
);
if
(
!
dataErrMsg
.
isEmpty
())
{
resultObj
.
insert
(
ERROR_KEY
,
dataErrMsg
);
}
else
{
resultObj
.
insert
(
RESULT_KEY
,
result
);
}
}
}
else
else
{
{
...
...
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