Skip to content

Commit cdd7bcb

Browse files
authored
fix: expo/api: Rename updatePassword to rotatePassword (#189)
In PR #188, we updated expo dependencies to use the new gnonative package with `RotatePassword`. In the expo TypeScript API, we also need to rename `updatePassword` to `rotatePassword`. Signed-off-by: Jeff Thompson <[email protected]>
1 parent 1e39391 commit cdd7bcb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

expo/src/api/GnoNativeApi.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ import {
4343
SetRemoteRequest,
4444
SetRemoteResponse,
4545
SignTxResponse,
46-
UpdatePasswordRequest,
47-
UpdatePasswordResponse,
46+
RotatePasswordRequest,
47+
RotatePasswordResponse,
4848
} from '@buf/gnolang_gnonative.bufbuild_es/gnonativetypes_pb';
4949
import { GnoNativeService } from '@buf/gnolang_gnonative.connectrpc_es/rpc_connect';
5050
import { PromiseClient } from '@connectrpc/connect';
@@ -272,12 +272,12 @@ export class GnoNativeApi implements GnoKeyApi, GoBridgeInterface {
272272
return response;
273273
}
274274

275-
async updatePassword(
275+
async rotatePassword(
276276
newPassword: string,
277277
addresses: Uint8Array[],
278-
): Promise<UpdatePasswordResponse> {
278+
): Promise<RotatePasswordResponse> {
279279
const client = this.#getClient();
280-
const response = client.updatePassword(new UpdatePasswordRequest({ newPassword, addresses }));
280+
const response = client.rotatePassword(new RotatePasswordRequest({ newPassword, addresses }));
281281
return response;
282282
}
283283

expo/src/api/types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
SetChainIDResponse,
1111
SetPasswordResponse,
1212
SetRemoteResponse,
13-
UpdatePasswordResponse,
13+
RotatePasswordResponse,
1414
KeyInfo,
1515
SignTxResponse,
1616
MakeTxResponse,
@@ -50,7 +50,7 @@ export interface GnoKeyApi {
5050
getKeyInfoByNameOrAddress: (nameOrBech32: string) => Promise<KeyInfo | undefined>;
5151
activateAccount: (nameOrBech32: string) => Promise<ActivateAccountResponse>;
5252
setPassword: (password: string, address: Uint8Array) => Promise<SetPasswordResponse>;
53-
updatePassword: (password: string, addresses: Uint8Array[]) => Promise<UpdatePasswordResponse>;
53+
rotatePassword: (password: string, addresses: Uint8Array[]) => Promise<RotatePasswordResponse>;
5454
getActivatedAccount: () => Promise<GetActivatedAccountResponse>;
5555
queryAccount: (address: Uint8Array) => Promise<QueryAccountResponse>;
5656
deleteAccount: (

0 commit comments

Comments
 (0)