Skip to content

Commit

Permalink
fixing test + no magic number
Browse files Browse the repository at this point in the history
  • Loading branch information
kalote committed Oct 31, 2023
1 parent 2c6d90a commit 14e600c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/constants/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@ export const LSP6_ALL_PERMISSIONS =

export const COMPACT_BYTES_ARRAY_STRING = '[CompactBytesArray]';

export const DEFAULT_GAS_VALUE = 2000000;
export const DEFAULT_GAS_VALUE = 2_000_000;
7 changes: 4 additions & 3 deletions src/provider/providerWrapper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import assert from 'assert';
import { ProviderWrapper } from './providerWrapper';

const erc725AccountAddress = '0x214be121bB52e6909c5158579b3458f8760f1b2f';
const defaultGas = 2_000_000;

describe('ProviderWrapper', () => {
describe('#getOwner', () => {
Expand All @@ -15,7 +16,7 @@ describe('ProviderWrapper', () => {
});
},
};
const ethSource = new ProviderWrapper(mockProvider);
const ethSource = new ProviderWrapper(mockProvider, defaultGas);

const owner = await ethSource.getOwner(erc725AccountAddress);
assert.deepStrictEqual(
Expand All @@ -30,7 +31,7 @@ describe('ProviderWrapper', () => {
cb(new Error('some error'));
},
};
const ethSource = new ProviderWrapper(mockProvider);
const ethSource = new ProviderWrapper(mockProvider, defaultGas);

try {
await ethSource.getOwner(erc725AccountAddress);
Expand All @@ -47,7 +48,7 @@ describe('ProviderWrapper', () => {
});
},
};
const ethSource = new ProviderWrapper(mockProvider);
const ethSource = new ProviderWrapper(mockProvider, defaultGas);

try {
await ethSource.getOwner(erc725AccountAddress);
Expand Down
3 changes: 2 additions & 1 deletion src/types/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ export interface ERC725Config {
* ```js title=Example
* const config = {
* ipfsGateway: 'https://ipfs.lukso.network/ipfs/'
* gas: 20_000_000 // Optional, default 2_000_000
* };
* ```
* Make sure to use the following format: `<url>/ipfs/`.<br/>
* Another example: `https://cloudflare-ipfs.com/ipfs/`
*/
ipfsGateway: string;
gas: number;
gas?: number;
}

export interface ERC725Options {
Expand Down

0 comments on commit 14e600c

Please sign in to comment.