Skip to content

Commit

Permalink
Merge pull request #93 from JustaName-id/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
HadiKhai authored Jan 16, 2025
2 parents 017165a + afabd34 commit 6e9fbdc
Show file tree
Hide file tree
Showing 26 changed files with 428 additions and 141 deletions.
42 changes: 42 additions & 0 deletions packages/@justaname.id/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
## 0.3.168 (2025-01-16)


### 🧱 Updated Dependencies

- Updated @justaname.id/sdk to 0.2.165

## 0.3.167 (2025-01-16)


### 🧱 Updated Dependencies

- Updated @justaname.id/sdk to 0.2.164

## 0.3.166 (2025-01-16)


### 🧱 Updated Dependencies

- Updated @justaname.id/sdk to 0.2.163

## 0.3.165 (2024-12-22)


### 🧱 Updated Dependencies

- Updated @justaname.id/sdk to 0.2.162

## 0.3.164 (2024-12-17)


### 🧱 Updated Dependencies

- Updated @justaname.id/sdk to 0.2.161

## 0.3.163 (2024-12-17)


### 🧱 Updated Dependencies

- Updated @justaname.id/sdk to 0.2.160

## 0.3.162 (2024-12-12)


Expand Down
4 changes: 2 additions & 2 deletions packages/@justaname.id/react/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@justaname.id/react",
"version": "0.3.162",
"version": "0.3.168",
"dependencies": {
"@ensdomains/ensjs": "4.0.2",
"@justaname.id/sdk": "0.2.159",
"@justaname.id/sdk": "0.2.165",
"axios": "^1.6.0",
"qs": "^6.12.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ export const useRecords = (params?: UseRecordsParams): UseRecordsResult => {
providerUrl: __providerUrl,
});
} catch (error) {
if (error instanceof Error && error.message.includes('NotFound')) {
if (
error instanceof Error &&
(error.message.includes('NotFound') ||
error.message.includes('ETH address not found'))
) {
throw error;
}
records = await getStandardRecords({
Expand Down
42 changes: 42 additions & 0 deletions packages/@justaname.id/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
## 0.2.165 (2025-01-16)


### 🧱 Updated Dependencies

- Updated @justaname.id/siwens to 0.0.98

## 0.2.164 (2025-01-16)


### 🧱 Updated Dependencies

- Updated @justaname.id/siwens to 0.0.97

## 0.2.163 (2025-01-16)


### 🧱 Updated Dependencies

- Updated @justaname.id/siwens to 0.0.96

## 0.2.162 (2024-12-22)


### 🧱 Updated Dependencies

- Updated @justaname.id/siwens to 0.0.95

## 0.2.161 (2024-12-17)


### 🧱 Updated Dependencies

- Updated @justaname.id/siwens to 0.0.94

## 0.2.160 (2024-12-17)


### 🧱 Updated Dependencies

- Updated @justaname.id/siwens to 0.0.93

## 0.2.159 (2024-12-12)


Expand Down
4 changes: 2 additions & 2 deletions packages/@justaname.id/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@justaname.id/sdk",
"version": "0.2.159",
"version": "0.2.165",
"dependencies": {
"@justaname.id/siwens": "0.0.92",
"@justaname.id/siwens": "0.0.98",
"axios": "^1.6.0",
"qs": "^6.12.0"
},
Expand Down
97 changes: 49 additions & 48 deletions packages/@justaname.id/sdk/src/lib/justaname/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
Subnames,
} from '../features';
import { InvalidConfigurationException } from '../errors/InvalidConfiguration.exception';
import { providerUrlChainIdLoadingMap, providerUrlChainIdMap } from '../memory';
// import { providerUrlChainIdLoadingMap, providerUrlChainIdMap } from '../memory';
import { getJsonRpcProvider } from '../utils/ethersCompat';

/**
Expand Down Expand Up @@ -223,53 +223,54 @@ export class JustaName {
}

private static checkConfig(configuration: JustaNameConfigDefaults): void {
this.checkNetworks(configuration.networks);
// To be optimized for serverless and re added later
// this.checkNetworks(configuration.networks);
}

private static checkNetworks(networks: Networks): void {
if (networks && networks.length > 0) {
networks.reduce((acc, network) => {
if (acc.includes(network.chainId)) {
throw new InvalidConfigurationException('The chainId is duplicated');
}
return [...acc, network.chainId];
}, [] as ChainId[]);

networks.forEach((network) => {
if (providerUrlChainIdLoadingMap.has(network.providerUrl)) {
if (providerUrlChainIdLoadingMap.get(network.providerUrl)) {
return;
}
}

providerUrlChainIdLoadingMap.set(network.providerUrl, true);

if (providerUrlChainIdMap.has(network.providerUrl)) {
if (
providerUrlChainIdMap.get(network.providerUrl) !== network.chainId
) {
throw new InvalidConfigurationException(
'The chainId does not match the chainId of the providerUrl'
);
} else {
return;
}
}

const provider = getJsonRpcProvider(network.providerUrl);
provider.getNetwork().then((_network) => {
if (network.chainId.toString() !== _network.chainId.toString()) {
throw new InvalidConfigurationException(
'The chainId does not match the chainId of the providerUrl'
);
}

providerUrlChainIdMap.set(
network.providerUrl,
parseInt(_network.chainId.toString())
);
});
});
}
}
// private static checkNetworks(networks: Networks): void {
// if (networks && networks.length > 0) {
// networks.reduce((acc, network) => {
// if (acc.includes(network.chainId)) {
// throw new InvalidConfigurationException('The chainId is duplicated');
// }
// return [...acc, network.chainId];
// }, [] as ChainId[]);
//
// networks.forEach((network) => {
// if (providerUrlChainIdLoadingMap.has(network.providerUrl)) {
// if (providerUrlChainIdLoadingMap.get(network.providerUrl)) {
// return;
// }
// }
//
// providerUrlChainIdLoadingMap.set(network.providerUrl, true);
//
// if (providerUrlChainIdMap.has(network.providerUrl)) {
// if (
// providerUrlChainIdMap.get(network.providerUrl) !== network.chainId
// ) {
// throw new InvalidConfigurationException(
// 'The chainId does not match the chainId of the providerUrl'
// );
// } else {
// return;
// }
// }
//
// const provider = getJsonRpcProvider(network.providerUrl);
// provider.getNetwork().then((_network) => {
// if (network.chainId.toString() !== _network.chainId.toString()) {
// throw new InvalidConfigurationException(
// 'The chainId does not match the chainId of the providerUrl'
// );
// }
//
// providerUrlChainIdMap.set(
// network.providerUrl,
// parseInt(_network.chainId.toString())
// );
// });
// });
// }
// }
}
24 changes: 24 additions & 0 deletions packages/@justaname.id/siwens/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## 0.0.98 (2025-01-16)

This was a version bump only for @justaname.id/siwens to align it with other projects, there were no code changes.

## 0.0.97 (2025-01-16)

This was a version bump only for @justaname.id/siwens to align it with other projects, there were no code changes.

## 0.0.96 (2025-01-16)

This was a version bump only for @justaname.id/siwens to align it with other projects, there were no code changes.

## 0.0.95 (2024-12-22)

This was a version bump only for @justaname.id/siwens to align it with other projects, there were no code changes.

## 0.0.94 (2024-12-17)

This was a version bump only for @justaname.id/siwens to align it with other projects, there were no code changes.

## 0.0.93 (2024-12-17)

This was a version bump only for @justaname.id/siwens to align it with other projects, there were no code changes.

## 0.0.92 (2024-12-12)

This was a version bump only for @justaname.id/siwens to align it with other projects, there were no code changes.
Expand Down
2 changes: 1 addition & 1 deletion packages/@justaname.id/siwens/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@justaname.id/siwens",
"version": "0.0.92",
"version": "0.0.98",
"peerDependencies": {
"ethers": "^5.6.8 || ^6.0.8",
"siwe": ">=2.0.0"
Expand Down
24 changes: 24 additions & 0 deletions packages/@justverified/plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## 0.0.103 (2025-01-16)

This was a version bump only for @justverified/plugin to align it with other projects, there were no code changes.

## 0.0.102 (2025-01-16)

This was a version bump only for @justverified/plugin to align it with other projects, there were no code changes.

## 0.0.101 (2025-01-16)

This was a version bump only for @justverified/plugin to align it with other projects, there were no code changes.

## 0.0.100 (2024-12-22)

This was a version bump only for @justverified/plugin to align it with other projects, there were no code changes.

## 0.0.99 (2024-12-17)

This was a version bump only for @justverified/plugin to align it with other projects, there were no code changes.

## 0.0.98 (2024-12-17)

This was a version bump only for @justverified/plugin to align it with other projects, there were no code changes.

## 0.0.97 (2024-12-12)

This was a version bump only for @justverified/plugin to align it with other projects, there were no code changes.
Expand Down
2 changes: 1 addition & 1 deletion packages/@justverified/plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@justverified/plugin",
"version": "0.0.97",
"version": "0.0.103",
"dependencies": {
"axios": "^1.6.0",
"lodash": "4.17.21",
Expand Down
24 changes: 24 additions & 0 deletions packages/@justweb3/efp-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## 0.1.64 (2025-01-16)

This was a version bump only for @justweb3/efp-plugin to align it with other projects, there were no code changes.

## 0.1.63 (2025-01-16)

This was a version bump only for @justweb3/efp-plugin to align it with other projects, there were no code changes.

## 0.1.62 (2025-01-16)

This was a version bump only for @justweb3/efp-plugin to align it with other projects, there were no code changes.

## 0.1.61 (2024-12-22)

This was a version bump only for @justweb3/efp-plugin to align it with other projects, there were no code changes.

## 0.1.60 (2024-12-17)

This was a version bump only for @justweb3/efp-plugin to align it with other projects, there were no code changes.

## 0.1.59 (2024-12-17)

This was a version bump only for @justweb3/efp-plugin to align it with other projects, there were no code changes.

## 0.1.58 (2024-12-12)

This was a version bump only for @justweb3/efp-plugin to align it with other projects, there were no code changes.
Expand Down
2 changes: 1 addition & 1 deletion packages/@justweb3/efp-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@justweb3/efp-plugin",
"version": "0.1.58",
"version": "0.1.64",
"dependencies": {
"axios": "^1.6.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@justweb3/poap-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@justweb3/poap-plugin",
"version": "0.0.16",
"version": "0.0.22",
"dependencies": {
"axios": "^1.6.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@justweb3/talent-protocol-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@justweb3/talent-protocol-plugin",
"version": "0.0.16",
"version": "0.0.22",
"dependencies": {
"axios": "^1.6.0"
},
Expand Down
24 changes: 24 additions & 0 deletions packages/@justweb3/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## 0.0.104 (2025-01-16)

This was a version bump only for @justweb3/ui to align it with other projects, there were no code changes.

## 0.0.103 (2025-01-16)

This was a version bump only for @justweb3/ui to align it with other projects, there were no code changes.

## 0.0.102 (2025-01-16)

This was a version bump only for @justweb3/ui to align it with other projects, there were no code changes.

## 0.0.101 (2024-12-22)

This was a version bump only for @justweb3/ui to align it with other projects, there were no code changes.

## 0.0.100 (2024-12-17)

This was a version bump only for @justweb3/ui to align it with other projects, there were no code changes.

## 0.0.99 (2024-12-17)

This was a version bump only for @justweb3/ui to align it with other projects, there were no code changes.

## 0.0.98 (2024-12-12)

This was a version bump only for @justweb3/ui to align it with other projects, there were no code changes.
Expand Down
2 changes: 1 addition & 1 deletion packages/@justweb3/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@justweb3/ui",
"version": "0.0.98",
"version": "0.0.104",
"dependencies": {
"@radix-ui/react-checkbox": "^1.1.2",
"@radix-ui/react-dialog": "^1.1.1",
Expand Down
Loading

0 comments on commit 6e9fbdc

Please sign in to comment.