Skip to content

Commit

Permalink
Configure 'cspell' (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
shelegdmitriy authored May 2, 2022
1 parent 7f00266 commit 44c6599
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"words": ["unvested", "divn", "nanosec", "yocto", "yoctoNEAR"],
"ignorePaths": ["src/tests/snapshots.ts"]
}
10 changes: 5 additions & 5 deletions src/lib/lockup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
import { getLockedTokenAmount } from "./balance";
import { nearApi } from "./near";
import {
formatReleseDuration,
formatReleaseDuration,
formatVestingInfo,
getStartLockupTimestamp,
getTransferInformation,
Expand All @@ -36,12 +36,12 @@ export const viewLockupState = async (
blockReference: BlockReference = { finality: "final" }
): Promise<LockupState> => {
const near = await nearApi(nearConfig);
const accountCalcutationInfo = await viewAccountBalance(
const accountCalculationInfo = await viewAccountBalance(
contractId,
nearConfig,
blockReference
);
const lockupAccountCodeHash = accountCalcutationInfo.codeHash;
const lockupAccountCodeHash = accountCalculationInfo.codeHash;

const result = await near.connection.provider.query<ViewStateResult>({
request_type: "view_state",
Expand All @@ -53,7 +53,7 @@ export const viewLockupState = async (

const blockTimestamp = (
await near.connection.provider.block({
blockId: accountCalcutationInfo.blockHeight,
blockId: accountCalculationInfo.blockHeight,
})
).header.timestamp_nanosec;

Expand Down Expand Up @@ -215,7 +215,7 @@ export const viewLockupAccount = async (
),
lockupState: {
...restLockupState,
releaseDuration: formatReleseDuration(releaseDuration),
releaseDuration: formatReleaseDuration(releaseDuration),
vestedInfo: formatVestingInfo(vestingInformation),
},
};
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const formatVestingInfo = (info: VestingInformation): string | null => {
* @param releaseDuration BN.
* @returns BN.
*/
export const formatReleseDuration = (releaseDuration: BN): BN =>
export const formatReleaseDuration = (releaseDuration: BN): BN =>
releaseDuration.div(new BN("1000000000")).divn(60).divn(60).divn(24);

/**
Expand Down
2 changes: 1 addition & 1 deletion src/tests/lockup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test("view all info about lockup account on 'finality' block", async (t) => {
t.pass();
});

test("view all info about account on particular block using arhival credencials", async (t) => {
test("view all info about account on particular block using archival credentials", async (t) => {
const items = lockupAccountSnapshots.length;
t.plan(items);
// eslint-disable-next-line functional/no-let
Expand Down

0 comments on commit 44c6599

Please sign in to comment.