Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Sep 12, 2023
1 parent d936c42 commit 9d9ecfd
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/pg/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { PgBytea } from '@hirosystems/api-toolkit';
import { hexToBuffer } from '../api/util/helpers';
<<<<<<< HEAD

/**
* Returns a list of referenced inscription ids from inscription content.
Expand Down Expand Up @@ -53,20 +52,4 @@ export function chunkArray<T>(arr: T[], chunkSize: number): T[][] {

export function objRemoveUndefinedValues(obj: object) {
Object.keys(obj).forEach(key => (obj as any)[key] === undefined && delete (obj as any)[key]);
=======

/**
* Returns a list of referenced inscription ids from inscription content.
* @param content - Inscription content
* @returns List of IDs
*/
export function getInscriptionRecursion(content: PgBytea): string[] {
const buf = typeof content === 'string' ? hexToBuffer(content) : content;
const strContent = buf.toString('utf-8');
const result: string[] = [];
for (const match of strContent.matchAll(/\/content\/([a-fA-F0-9]{64}i\d+)/g)) {
result.push(match[1]);
}
return result;
>>>>>>> master
}

0 comments on commit 9d9ecfd

Please sign in to comment.