Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bridge-backend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
movabridge
bridge-backend
Commits
deeb57a3
Commit
deeb57a3
authored
Nov 27, 2025
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
profile user history query
parent
927e42b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
db.go
dao/db.go
+5
-4
No files found.
dao/db.go
View file @
deeb57a3
...
@@ -170,7 +170,7 @@ func (d *Dao) GetHistoryInfo(user string) (history apiModel.History, err error)
...
@@ -170,7 +170,7 @@ func (d *Dao) GetHistoryInfo(user string) (history apiModel.History, err error)
completedHistory
:=
make
([]
*
apiModel
.
HistoryInfo
,
0
,
1000
)
completedHistory
:=
make
([]
*
apiModel
.
HistoryInfo
,
0
,
1000
)
for
_
,
event
:=
range
events
{
for
_
,
event
:=
range
events
{
if
event
.
FromChainTxHash
==
""
||
event
.
ToChainTxHash
==
""
{
if
event
.
FromChainTxHash
==
""
{
continue
continue
}
}
fromChain
,
_
:=
d
.
chainList
.
Get
(
event
.
FromChain
)
fromChain
,
_
:=
d
.
chainList
.
Get
(
event
.
FromChain
)
...
@@ -194,8 +194,10 @@ func (d *Dao) GetHistoryInfo(user string) (history apiModel.History, err error)
...
@@ -194,8 +194,10 @@ func (d *Dao) GetHistoryInfo(user string) (history apiModel.History, err error)
if
event
.
ToChainStatus
<=
int
(
constant
.
TransferChainWaitConfirm
)
{
if
event
.
ToChainStatus
<=
int
(
constant
.
TransferChainWaitConfirm
)
{
pendingHistory
=
append
(
pendingHistory
,
record
)
pendingHistory
=
append
(
pendingHistory
,
record
)
}
else
{
}
else
{
record
.
UrlTarget
=
toChain
.
Explorer
+
"/tx/"
+
event
.
ToChainTxHash
if
event
.
ToChainTxHash
!=
""
{
completedHistory
=
append
(
completedHistory
,
record
)
record
.
UrlTarget
=
toChain
.
Explorer
+
"/tx/"
+
event
.
ToChainTxHash
completedHistory
=
append
(
completedHistory
,
record
)
}
}
}
}
}
// sort pending by CreateTime desc
// sort pending by CreateTime desc
...
@@ -211,7 +213,6 @@ func (d *Dao) GetHistoryInfo(user string) (history apiModel.History, err error)
...
@@ -211,7 +213,6 @@ func (d *Dao) GetHistoryInfo(user string) (history apiModel.History, err error)
history
.
Finish
=
completedHistory
history
.
Finish
=
completedHistory
return
history
,
nil
return
history
,
nil
}
}
type
tokenBalance
struct
{
type
tokenBalance
struct
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment