Skip to content

Commit

Permalink
feat: changing chainIds
Browse files Browse the repository at this point in the history
  • Loading branch information
rigbyciao authored and rightjelkin committed Feb 9, 2023
1 parent eec55ba commit 83fe5cc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 28 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Available format:

- `"Venom Mainnet"`

_You don't have to fill in this field, then the default Name is **`Venom Mainnet`** for `1000` or **`Venom Testnet`** for `1010`._
_You don't have to fill in this field, then the default Name is **`Venom Mainnet`** for `1` or **`Venom Testnet`** for `1000`._

### Providers options (`providersOptions`)

Expand Down Expand Up @@ -154,7 +154,7 @@ const initVenomConnect = async () => {
fallback: () =>
EverscaleStandaloneClient.create({
connection: {
id: 1000,
id: 1,
group: "venom_mainnet",
type: "jrpc",
data: {
Expand Down
2 changes: 1 addition & 1 deletion examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react-scripts": "5.0.1",
"styled-components": "^5.3.5",
"typescript": "^4.4.2",
"venom-connect": "^1.0.14"
"venom-connect": "^1.0.16"
},
"scripts": {
"start": "react-scripts start",
Expand Down
26 changes: 5 additions & 21 deletions examples/react/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const initTheme = "light" as const;
const standaloneFallback = () =>
EverscaleStandaloneClient.create({
connection: {
id: 1000,
id: 1,
group: "venom_mainnet",
type: "jrpc",
data: {
Expand All @@ -36,7 +36,7 @@ const standaloneFallback = () =>
const initVenomConnect = async () => {
return new VenomConnect({
theme: initTheme,
// checkNetworkId: 1000,
checkNetworkId: 1,
providersOptions: {
venomwallet: {
links: {
Expand Down Expand Up @@ -252,13 +252,13 @@ const App = () => {
await venomConnect?.getStandalone("venomwallet");

if (standalone) {
const testContractAddress = new Address(
"0:52195e5fd2d90b996c2a5e0f1825b84014a3962a5e31a544fb63bae13fec5727"
const mainnetContractAddress = new Address(
"0:", // todo
);

const contract = new standalone.Contract(
testContractAbi,
testContractAddress
mainnetContractAddress
);
setStandaloneMethodsIsFetching(true);
const outputs = await contract.methods
Expand All @@ -283,22 +283,6 @@ const App = () => {
<Grid item>
<Typography variant="h1" component="h1" textAlign="center">
Example
{/* (v1.0.14)
<div
style={{
display: "flex",
justifyContent: "center",
alignItems: "center",
}}
>
<i
style={{
fontSize: "0.3em",
}}
>
[Deployment: Dec 02 2022]
</i>
</div> */}
</Typography>
</Grid>
</Grid>
Expand Down
8 changes: 4 additions & 4 deletions src/VenomConnect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ let oldRoot: Root | undefined = undefined;

const _getDefaultVenomNetworkNameById = (networkId: number) => {
switch (networkId) {
case 1010:
return "Venom Testnet";
case 1000:
return "Venom Testnet";
case 1:
default:
return "Venom Mainnet";
}
Expand All @@ -57,8 +57,8 @@ const getDefaultVenomNetworkNameById = (networkId: number | number[]) => {
const defaultOptions: VenomConnectOptions = {
theme: themesList.default.name,
providersOptions: {},
checkNetworkId: 1000,
checkNetworkName: "Venom Testnet",
checkNetworkId: 1,
checkNetworkName: "Venom Mainnet",
};
class VenomConnect {
private show: boolean = false;
Expand Down

0 comments on commit 83fe5cc

Please sign in to comment.