Skip to content

Commit

Permalink
fix(rpc): return stxPublicKey from getAddresses
Browse files Browse the repository at this point in the history
  • Loading branch information
sjc5 authored and kyranjamie committed Jul 29, 2024
1 parent 3c81db3 commit b31c59e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/app/pages/rpc-get-addresses/use-request-accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export function useGetAddresses() {
if (stacksAccount) {
const stacksAddressResponse = {
symbol: 'STX',
address: stacksAccount?.address ?? '',
address: stacksAccount.address ?? '',
publicKey: stacksAccount.stxPublicKey ?? '',
};

keysToIncludeInResponse.push(stacksAddressResponse);
Expand Down
8 changes: 7 additions & 1 deletion tests/specs/rpc-get-addresses/get-addresses.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ function getExpectedResponseForKeys(keys: SupportedBlockchains[]) {
derivationPath: "m/86'/0'/0'/0/0",
},
];
const stacksKeys = [{ symbol: 'STX', address: 'SPS8CKF63P16J28AYF7PXW9E5AACH0NZNTEFWSFE' }];
const stacksKeys = [
{
symbol: 'STX',
publicKey: '0329b076bc20f7b1592b2a1a5cb91dfefe8c966e50e256458e23dd2c5d63f8f1af',
address: 'SPS8CKF63P16J28AYF7PXW9E5AACH0NZNTEFWSFE',
},
];
return {
jsonrpc: '2.0',
result: {
Expand Down

0 comments on commit b31c59e

Please sign in to comment.