Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
TalDerei committed Dec 22, 2024
1 parent 472a542 commit a654938
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ export const transactionInfoByHash: Impl['transactionInfoByHash'] = async (req,
throw new ConnectError('Transaction not available', Code.NotFound);
}

let { txp: perspective, txv: view } = await generateTransactionInfo(
const { txp: perspective, txv } = await generateTransactionInfo(
await fvk(),
transaction,
indexedDb.constants(),
);

// Invoke a higher-level translator on the transaction view.
let view = txv;
view = await txvTranslator(view);

Check failure on line 35 in packages/services/src/view-service/transaction-info-by-hash.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected `await` of a non-Promise (non-"Thenable") value

const txInfo = new TransactionInfo({ height, id: req.id, transaction, perspective, view });
Expand Down
6 changes: 4 additions & 2 deletions packages/services/src/view-service/util/transaction-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import { getTransmissionKeyByAddress } from '@penumbra-zone/wasm/keys';
// in the UI component library. For example, when handling IBC withdrawals with transparent
// addresses, this component transforms ephemeral addresses into their bech32-encoded
// transparent form to ensure the proper data is being displayed.
export const txvTranslator = async (view: TransactionView): Promise<TransactionView> => {
export const txvTranslator = (view: TransactionView): TransactionView => {
// 'Ics20Withdrawal' action view
const withdrawalAction = view?.bodyView?.actionViews?.find(
if (!view.bodyView) return view;

Check failure on line 10 in packages/services/src/view-service/util/transaction-view.ts

View workflow job for this annotation

GitHub Actions / Lint

Expected { after 'if' condition

const withdrawalAction = view.bodyView.actionViews.find(
action => action.actionView.case === 'ics20Withdrawal',
);

Expand Down

0 comments on commit a654938

Please sign in to comment.