Files
explore/lib/errors/getErrorProp.ts
T
tom goriunovandGitHub fd45c5926e Arbitrum messages claiming (#2533)
* txn withdrawals page stub

* add base page layout

* add ConnectWallet alert

* save search term in page query param

* add links to the new page

* add functionality to claim button

* combine "Connect wallet" and "Claim" buttons

* Refactor rollup configuration to introduce ParentChain structure and deprecate legacy environment variables

* handle txn claim

* allow to pass array of RPC urls for parent chain config

* display token value and completion tx hash

* fix csp

* write tests for arbitrum l2 txn withdrawals

* fix ts

* review fixes

* update screenshots and hide button if the txn is not confirmed yet
2025-02-11 10:36:36 +01:00

9 lines
294 B
TypeScript

import getErrorObj from './getErrorObj';
export default function getErrorProp<T extends unknown>(error: unknown, prop: string): T | undefined {
const errorObj = getErrorObj(error);
return errorObj && prop in errorObj ?
(errorObj[prop as keyof typeof errorObj] as T) :
undefined;
}