File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -297,32 +297,6 @@ func (s *server) GetTokenAccountInfos(ctx context.Context, req *accountpb.GetTok
297
297
func (s * server ) fetchBalances (ctx context.Context , recordsByType map [commonpb.AccountType ][]* common.AccountRecords ) (map [string ]* balanceMetadata , error ) {
298
298
balanceMetadataByTokenAccount := make (map [string ]* balanceMetadata )
299
299
300
- // Pre-privacy accounts are not supported by the new batching stuff
301
- if _ , ok := recordsByType [commonpb .AccountType_LEGACY_PRIMARY_2022 ]; ok {
302
- tokenAccount , err := common .NewAccountFromPublicKeyString (recordsByType [commonpb .AccountType_LEGACY_PRIMARY_2022 ][0 ].General .TokenAccount )
303
- if err != nil {
304
- return nil , err
305
- }
306
-
307
- quarks , err := balance .CalculateFromCache (ctx , s .data , tokenAccount )
308
- switch err {
309
- case nil :
310
- balanceMetadataByTokenAccount [tokenAccount .PublicKey ().ToBase58 ()] = & balanceMetadata {
311
- value : quarks ,
312
- source : accountpb .TokenAccountInfo_BALANCE_SOURCE_CACHE ,
313
- }
314
- case balance .ErrNotManagedByCode :
315
- // Don't bother calculating a balance, the account isn't useable in Code
316
- balanceMetadataByTokenAccount [tokenAccount .PublicKey ().ToBase58 ()] = & balanceMetadata {
317
- value : 0 ,
318
- source : accountpb .TokenAccountInfo_BALANCE_SOURCE_UNKNOWN ,
319
- }
320
- default :
321
- return nil , err
322
- }
323
- }
324
-
325
- // Post-privacy Timelock account balances can be fetched using a batched method from cache
326
300
var batchedAccountRecords []* common.AccountRecords
327
301
for accountType , batchAccountRecords := range recordsByType {
328
302
if accountType == commonpb .AccountType_LEGACY_PRIMARY_2022 {
You can’t perform that action at this time.
0 commit comments