Skip to content

Commit

Permalink
Release 0.2.36 (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelticot authored Mar 14, 2024
2 parents 5ea2eb7 + b303ca2 commit c4aa11f
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 46 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Polygon RPC URL (Optional)
VUE_APP_POLYGON_RPC_URL=

# Verida vault context name. (Required)
VUE_APP_VAULT_CONTEXT_NAME=Verida: Vault

Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/create_release.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/generate_release_notes.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "account-explorer",
"version": "0.2.25",
"version": "0.2.36",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
2 changes: 1 addition & 1 deletion src/@types/node/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
declare namespace NodeJS {
export interface ProcessEnv {
NODE_ENV?: "production" | "development" | "test";
VUE_APP_POLYGON_RPC_URL?: string;
VUE_APP_VERIDA_CONTEXT_NAME?: string;
VUE_APP_VERIDA_VAULT_CONTEXT_NAME?: string;
VUE_APP_VERIDA_LOGO_URL?: string;
VUE_APP_VERDIA_LOGIN_TEXT?: string;
VUE_APP_BASE_URL?: string;
VUE_APP_VERIDA_TESTNET_DEFAULT_DID_SERVER?: string;
VUE_APP_VERIDA_ENV?: "testnet" | "mainnet" | "local";
}
}
5 changes: 2 additions & 3 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ const veridaEnv: EnvironmentType = <EnvironmentType>(
process.env.VUE_APP_VERIDA_ENV
);

const veridaRpcUrl = process.env.VUE_APP_POLYGON_RPC_URL;
const veridaLogoUrl = process.env.VUE_APP_VERIDA_LOGO_URL;
const veridaLoginText = process.env.VUE_APP_VERIDA_LOGO_URL;
const veridaContextName = process.env.VUE_APP_VERIDA_CONTEXT_NAME;
const veridaVaultContextName = process.env.VUE_APP_VERIDA_VAULT_CONTEXT_NAME;
const veridaNodeSummaryUrl = process.env.VUE_APP_NODE_SUMMARY_URL;
const veridaNetworkStatusUrl = process.env.VUE_APP_NETWORK_STATUS_URL;
const veridaTestnetDefaultDidServerUrl =
process.env.VUE_APP_VERIDA_TESTNET_DEFAULT_DID_SERVER;
const veridaExplorerUrls = {
mainnet: process.env.VUE_APP_EXPLORER_URL_MAINNET,
testnet: process.env.VUE_APP_EXPLORER_URL_TESTNET,
Expand All @@ -24,11 +23,11 @@ const veridaExplorerUrls = {
export const config = {
nodeEnv,
veridaEnv,
veridaRpcUrl,
veridaLogoUrl,
veridaLoginText,
veridaContextName,
veridaVaultContextName,
veridaTestnetDefaultDidServerUrl,
veridaNodeSummaryUrl,
veridaNetworkStatusUrl,
veridaExplorerUrls,
Expand Down
11 changes: 7 additions & 4 deletions src/helpers/VeridaHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ import { CREDENTIAL } from "@/constant";
import { Profile } from "@/interface";
import { Client, Context } from "@verida/client-ts";
import { decodeUri, fetchVeridaUri } from "@verida/helpers";
import { IMessaging } from "@verida/types";
import { ClientConfig, IMessaging } from "@verida/types";
import { Credentials } from "@verida/verifiable-credentials";
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
import { EventEmitter } from "events";

dayjs.extend(utc);

const userConfig = {
const userConfig: ClientConfig = {
environment: config.veridaEnv,
didServerUrl: config.veridaTestnetDefaultDidServerUrl,
didClientConfig: {
network: config.veridaEnv,
rpcUrl: config.veridaRpcUrl,
},
};

class VeridaClient extends EventEmitter {
Expand All @@ -28,7 +31,7 @@ class VeridaClient extends EventEmitter {
private _messagingInstance: IMessaging | undefined;
on: any;

constructor(config: typeof userConfig) {
constructor(config: ClientConfig) {
super();
this.client = new Client(config);
this.did = "";
Expand Down

0 comments on commit c4aa11f

Please sign in to comment.