Skip to content

Commit

Permalink
clean up slice
Browse files Browse the repository at this point in the history
  • Loading branch information
jurevans committed Jul 26, 2023
1 parent 882e29b commit 14943c3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions apps/namada-interface/src/slices/StakingAndGovernance/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,14 @@ export const postNewBonding = createAsyncThunk<
const { derived } = thunkApi.getState().accounts;
const integration = getIntegration(chainId);
const signer = integration.signer() as Signer;
const { owner, validatorId, amount } = change;
const account = derived[chainId][owner];
const { owner: source, validatorId: validator, amount } = change;
const account = derived[chainId][source];
const { type, publicKey } = account.details;

await signer.submitBond(
{
source: owner,
validator: validatorId,
source,
validator,
amount: new BigNumber(amount),
nativeToken: Tokens.NAM.address || "",
tx: {
Expand Down Expand Up @@ -272,16 +272,16 @@ export const postNewUnbonding = createAsyncThunk<
const { derived } = thunkApi.getState().accounts;
const integration = getIntegration(chainId);
const signer = integration.signer() as Signer;
const { owner } = change;
const { owner: source, validatorId: validator, amount } = change;
const {
details: { type, publicKey },
} = derived[chainId][owner];
} = derived[chainId][source];

await signer.submitUnbond(
{
source: change.owner,
validator: change.validatorId,
amount: change.amount,
source,
validator,
amount: new BigNumber(amount),
tx: {
token: Tokens.NAM.address || "",
feeAmount: new BigNumber(0),
Expand Down

0 comments on commit 14943c3

Please sign in to comment.