Skip to content

Commit

Permalink
feat: added WithViewingKey to vk functions
Browse files Browse the repository at this point in the history
  • Loading branch information
SissonJ committed Mar 5, 2024
1 parent a8f0069 commit 89b4a74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/contracts/definitions/derivativeShd.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
} from 'vitest';
import {
msgQueryStakingInfo,
msgQueryUserHoldings,
msgQueryUserUnbondings,
msgQueryUserHoldingsWithViewingKey,
msgQueryUserUnbondingsWithViewingKey,
msgDerivativeShdStake,
msgDerivativeShdUnbond,
msgDerivativeShdTransferStaked,
Expand Down Expand Up @@ -40,7 +40,7 @@ test('it tests the form of the query user holdings msg', () => {
viewing_key: 'VIEWING_KEY',
},
};
expect(msgQueryUserHoldings('USER_ADDR', 'VIEWING_KEY')).toStrictEqual(output);
expect(msgQueryUserHoldingsWithViewingKey('USER_ADDR', 'VIEWING_KEY')).toStrictEqual(output);
});

test('it tests the form of the query user holdings msg with permit', () => {
Expand Down Expand Up @@ -68,7 +68,7 @@ test('it tests the form of the query user unbondings msg', () => {
viewing_key: 'VIEWING_KEY',
},
};
expect(msgQueryUserUnbondings('USER_ADDR', 'VIEWING_KEY')).toStrictEqual(output);
expect(msgQueryUserUnbondingsWithViewingKey('USER_ADDR', 'VIEWING_KEY')).toStrictEqual(output);
});

test('it tests the form of the query user unbondings msg', () => {
Expand Down
8 changes: 4 additions & 4 deletions src/contracts/definitions/derivativeShd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const msgQueryStakingInfo = () => ({ staking_info: {} });
* Query the users private holdings
* NOT FOR PRODUCTION USE, CONTRACT IS IN DEVELOPMENT ON TESTNET ONLY
*/
const msgQueryUserHoldings = (userAddress: string, viewingKey: string) => ({
const msgQueryUserHoldingsWithViewingKey = (userAddress: string, viewingKey: string) => ({
holdings: {
address: userAddress,
viewing_key: viewingKey,
Expand All @@ -36,7 +36,7 @@ const msgQueryUserHoldingsWithPermit = (permit: AccountPermit) => ({
* Query the users private unbondings
* NOT FOR PRODUCTION USE, CONTRACT IS IN DEVELOPMENT ON TESTNET ONLY
*/
const msgQueryUserUnbondings = (userAddress: string, viewingKey: string) => ({
const msgQueryUserUnbondingsWithViewingKey = (userAddress: string, viewingKey: string) => ({
unbondings: {
address: userAddress,
viewing_key: viewingKey,
Expand Down Expand Up @@ -128,8 +128,8 @@ function msgDerivativeShdTransferStaked({

export {
msgQueryStakingInfo,
msgQueryUserHoldings,
msgQueryUserUnbondings,
msgQueryUserHoldingsWithViewingKey,
msgQueryUserUnbondingsWithViewingKey,
msgQueryUserHoldingsWithPermit,
msgQueryUserUnbondingsWithPermit,
msgDerivativeShdStake,
Expand Down

0 comments on commit 89b4a74

Please sign in to comment.