Skip to content

Commit 204d671

Browse files
committed
fix(gRPC): circ supply logic issue
1 parent 38929cd commit 204d671

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

client/client_mgr.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@ func (cm *Mgr) GetCirculatingSupply() (int64, error) {
171171

172172
balance3, err := localClient.GetBalance("pc1znn2qxsugfrt7j4608zvtnxf8dnz8skrxguyf45")
173173
if err == nil {
174-
addr3Out = 3.78e+15 - balance3
174+
addr3Out = 4_200_000_000_000_000 - balance3
175175
}
176176

177177
balance4, err := localClient.GetBalance("pc1zs64vdggjcshumjwzaskhfn0j9gfpkvche3kxd3")
178178
if err == nil {
179-
addr4Out = 1.89e+15 - balance4
179+
addr4Out = 2_100_000_000_000_000 - balance4
180180
}
181181

182182
balance5, err := localClient.GetBalance("pc1zuavu4sjcxcx9zsl8rlwwx0amnl94sp0el3u37g")

engine/engine_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ func TestNetworkStatus(t *testing.T) {
7373
int64(100), nil,
7474
)
7575

76+
client.EXPECT().GetBalance("pc1zuavu4sjcxcx9zsl8rlwwx0amnl94sp0el3u37g").Return(
77+
int64(100), nil,
78+
)
79+
80+
client.EXPECT().GetBalance("pc1zf0gyc4kxlfsvu64pheqzmk8r9eyzxqvxlk6s6t").Return(
81+
int64(100), nil,
82+
)
83+
7684
status, err := eng.NetworkStatus()
7785
assert.NoError(t, err)
7886

0 commit comments

Comments
 (0)