Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
osmosis
Commits
7c5e1cd2
Commit
7c5e1cd2
authored
3 years ago
by
ValarDragon
Browse files
Options
Download
Email Patches
Plain Diff
Correctly export fields
parent
6c83d3f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
x/lockup/client/cli/query.go
+14
-14
x/lockup/client/cli/query.go
with
14 additions
and
14 deletions
+14
-14
x/lockup/client/cli/query.go
+
14
-
14
View file @
7c5e1cd2
...
...
@@ -611,33 +611,33 @@ $ %s query lockup output-all-locks <max lock ID>
)
type
LockResult
struct
{
i
d
int
s
tatus
int
// one of {doesnt_exist, }
d
enom
string
a
mount
sdk
.
Int
a
ddress
string
u
nbondEndTime
time
.
Time
I
d
int
S
tatus
int
// one of {doesnt_exist, }
D
enom
string
A
mount
sdk
.
Int
A
ddress
string
U
nbondEndTime
time
.
Time
}
queryClient
:=
types
.
NewQueryClient
(
clientCtx
)
results
:=
[]
LockResult
{}
for
i
:=
0
;
i
<=
int
(
maxLockID
);
i
++
{
curLockResult
:=
LockResult
{
i
d
:
i
}
curLockResult
:=
LockResult
{
I
d
:
i
}
res
,
err
:=
queryClient
.
LockedByID
(
cmd
.
Context
(),
&
types
.
LockedRequest
{
LockId
:
uint64
(
i
)})
if
err
!=
nil
{
curLockResult
.
s
tatus
=
doesnt_exist_status
curLockResult
.
S
tatus
=
doesnt_exist_status
results
=
append
(
results
,
curLockResult
)
continue
}
// 1527019420 is hardcoded time well before launch, but well after year 1
if
res
.
Lock
.
EndTime
.
Before
(
time
.
Unix
(
1527019420
,
0
))
{
curLockResult
.
s
tatus
=
bonded_status
curLockResult
.
S
tatus
=
bonded_status
}
else
{
curLockResult
.
s
tatus
=
unbonding_status
curLockResult
.
u
nbondEndTime
=
res
.
Lock
.
EndTime
curLockResult
.
d
enom
=
res
.
Lock
.
Coins
[
0
]
.
Denom
curLockResult
.
a
mount
=
res
.
Lock
.
Coins
[
0
]
.
Amount
curLockResult
.
a
ddress
=
res
.
Lock
.
Owner
curLockResult
.
S
tatus
=
unbonding_status
curLockResult
.
U
nbondEndTime
=
res
.
Lock
.
EndTime
curLockResult
.
D
enom
=
res
.
Lock
.
Coins
[
0
]
.
Denom
curLockResult
.
A
mount
=
res
.
Lock
.
Coins
[
0
]
.
Amount
curLockResult
.
A
ddress
=
res
.
Lock
.
Owner
}
results
=
append
(
results
,
curLockResult
)
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment