Skip to content

Commit

Permalink
allow empty addresses while query send to eth
Browse files Browse the repository at this point in the history
  • Loading branch information
kstoykov committed Nov 8, 2023
1 parent 6221930 commit 3171e1b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cudosjs",
"version": "2.0.4",
"version": "2.0.5",
"author": "",
"description": "JavaScript SDK for Cudos Network",
"license": "ISC",
Expand Down
10 changes: 6 additions & 4 deletions src/stargate/modules/gravity/clients/queryClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,13 @@ export class GravityQueryClient{
return this.gravityQueryClient.gravity.getDelegateKeyByOrchestrator(orchestratorAddress)
}

public async getPendingSendToEth( senderAddress: string ): Promise<QueryPendingSendToEthResponse> {
// Check for valid cudos address
checkValidAddress(senderAddress)
public async getPendingSendToEth( senderAddress: string = "" ): Promise<QueryPendingSendToEthResponse> {
if (senderAddress != "") {
// Check for valid cudos address
checkValidAddress(senderAddress)
}

return this.gravityQueryClient.gravity.getPendingSendToEth(senderAddress)
}

}
}
2 changes: 1 addition & 1 deletion src/stargate/modules/gravity/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface GravityExtension {
readonly getDelegateKeyByValidator: ( validatorAddress: string ) => Promise<QueryDelegateKeysByValidatorAddressResponse>;
readonly getDelegateKeyByEth: ( ethAddress: string ) => Promise<QueryDelegateKeysByEthAddressResponse>;
readonly getDelegateKeyByOrchestrator: ( orchestratorAddress: string ) => Promise<QueryDelegateKeysByOrchestratorAddressResponse>;
readonly getPendingSendToEth: ( senderAddress: string ) => Promise<QueryPendingSendToEthResponse>;
readonly getPendingSendToEth: ( senderAddress?: string ) => Promise<QueryPendingSendToEthResponse>;



Expand Down

0 comments on commit 3171e1b

Please sign in to comment.