Using push instead of unshift

This commit is contained in:
Milan Steiner 2022-03-14 11:17:25 +01:00
parent 03f783194f
commit d4b382a1af

View File

@ -347,7 +347,7 @@ export class CosmWasmClient {
const { contracts, pagination }: QueryContractsByCodeResponse =
await this.forceGetQueryClient().wasm.listContractsByCodeId(codeId, startAtKey);
const loadedContracts = contracts || [];
allContracts.unshift(...loadedContracts);
allContracts.push(...loadedContracts);
startAtKey = pagination?.nextKey;
} while (startAtKey?.length !== 0 && startAtKey !== undefined);