Skip to content

Commit

Permalink
fix(lint): fix lint errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Aug 5, 2024
1 parent e55a67b commit e532f4e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/utils/ao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export async function evolveANT({

export function createAoSigner(signer: ContractSigner): AoSigner {
if (!('publicKey' in signer)) {
return createDataItemSigner(signer) as any;
return createDataItemSigner(signer) as AoSigner;
}

const aoSigner = async ({ data, tags, target, anchor }) => {
Expand Down
2 changes: 2 additions & 0 deletions src/utils/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function safeDecode<R = unknown>(data: any): R {
try {
return JSON.parse(data);
Expand Down
4 changes: 2 additions & 2 deletions src/utils/processes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class ArNSEventEmitter extends EventEmitter {
.then((records: Record<string, AoArNSNameData>) => {
Object.entries(records).forEach(([name, arnsRecord]) => {
if (antIds.includes(arnsRecord.processId)) {
if (!uniqueContractProcessIds[arnsRecord.processId]) {
if (uniqueContractProcessIds[arnsRecord.processId] == undefined) {
uniqueContractProcessIds[arnsRecord.processId] = {
state: undefined,
names: {},
Expand Down Expand Up @@ -192,7 +192,7 @@ export const fetchAllArNSRecords = async ({
do {
const pageResult = await contract
.getArNSRecords({ cursor, limit: pageSize })
.catch((e: any) => {
.catch((e: Error) => {
logger?.error(`Error getting ArNS records`, {
message: e?.message,
stack: e?.stack,
Expand Down

0 comments on commit e532f4e

Please sign in to comment.