Skip to content

Commit

Permalink
fix: rename axios header to header
Browse files Browse the repository at this point in the history
  • Loading branch information
frdomovic committed Jun 20, 2024
1 parent c917e31 commit 06edebd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/calimero-sdk/src/auth/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { WalletType } from '../api/nodeApi';
import { ClientKey } from '../types/storage';
import { getStorageClientKey } from '../storage/storage';

export interface AxiosHeader {
export interface Header {
[key: string]: string;
}

export async function createAuthHeader(
payload: string,
contextId: string = "admin-ui"
): Promise<AxiosHeader | null> {
): Promise<Header | null> {
const privateKey: PrivateKey = await getPrivateKey();

if (!privateKey) {
Expand All @@ -31,7 +31,7 @@ export async function createAuthHeader(
const signatureBase58 = bs58.encode(signature);
const contentBase58 = bs58.encode(hashArray);

const headers: AxiosHeader = {
const headers: Header = {
wallet_type: JSON.stringify(WalletType.NEAR),
signing_key: signingKey,
signature: signatureBase58,
Expand Down

0 comments on commit 06edebd

Please sign in to comment.