Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add updates for end-2-end flow #74

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gateway-ui/src/stories/Index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ type Story = StoryObj<typeof CollapsableGatewayPortal>;
export const WalletWithToken: Story = {
args: {
userWallet: new Wallet(foundryDefaultPKWithToken, publicRPC),
networkName: "Identity.com KYC Verification"
networkName: "Identity-KYC-Verification"
},
};

export const WalletWithoutToken: Story = {
args: {
userWallet: Wallet.createRandom().connect(publicRPC),
networkName: "Identity.com KYC Verification"
networkName: "Identity-KYC-Verification"
},
};

Expand Down
4 changes: 3 additions & 1 deletion gateway-ui/src/useGatewayPortal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ export const useGatewayPortal = (props: GatewayPortalProps) => {
const loadGatekeeperIssuerData = async () => {
// If we need to look up the service endpoint of each gatekeeper
const provider = await userWallet.provider;
const address = userWallet.getAddress();
const chainId = await userWallet.getChainId();

if(portalData && portalData.invalidPassData) {
const didResitry = new DidRegistry(provider, BNB_TESTNET_CONTRACT_ADDRESSES.didRegistry, {chainEnvironment: 'testnet'});
Expand All @@ -163,7 +165,7 @@ export const useGatewayPortal = (props: GatewayPortalProps) => {
return {
issuerAlias: resolvedConfig.displayName,
issuanceFee: issuer.issuanceFee,
passRequestLink: resolvedConfig.gatewayIssuerEndpoint
passRequestLink: `${resolvedConfig.gatewayIssuerEndpoint}?chain_id=${chainId}&wallet_address=${address}`
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import { sleep, getDeploymentSigner } from "../defender-utils";
import hre , { ethers, upgrades } from "hardhat";
import { Signer } from '@ethersproject/abstract-signer/src.ts'
import { COMPLERE_TESTNET_CONTRACT_ADDRESSES, ZERO_ADDRESS, gatekeeperOneTestnetWallet, gatekeeperTwoTestnetWallet, testNetworkName, testNetworkNameWithErc20Fees, testNetworkNameWithNativeFees, trustSwiftlyTestnetGatekeeperWallet } from "../utils";
import { BNB_TESTNET_CONTRACT_ADDRESSES, COMPLERE_TESTNET_CONTRACT_ADDRESSES, ZERO_ADDRESS, gatekeeperOneTestnetWallet, gatekeeperTwoTestnetWallet, testNetworkName, testNetworkNameWithErc20Fees, testNetworkNameWithNativeFees, trustSwiftlyTestnetGatekeeperWallet } from "../utils";
import { GatewayNetwork, GatewayToken, IGatewayNetwork } from "../../typechain-types";

async function main() {
let signer: Signer;
signer = await getDeploymentSigner();

const gatewayNetworkContractAddress = COMPLERE_TESTNET_CONTRACT_ADDRESSES.gatewayNetwork;
const gatewayNetworkContractAddress = BNB_TESTNET_CONTRACT_ADDRESSES.gatewayNetwork;

const NetworkContractFactory = await ethers.getContractFactory("GatewayNetwork", signer!);
const networkContract = NetworkContractFactory.attach(gatewayNetworkContractAddress) as GatewayNetwork;


await networkContract.connect(signer!).addGatekeeper(await signer.getAddress(), testNetworkName);
const tx = await networkContract.connect(signer!).addGatekeeper("0xBae36244AdaDe42247dd31e8cFaECb0a1F0e4570", testNetworkName);

console.log(JSON.stringify(tx))
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { sleep, getDeploymentSigner } from "../defender-utils";
import hre , { ethers, upgrades } from "hardhat";
import { Signer } from '@ethersproject/abstract-signer/src.ts'
import { COMPLERE_TESTNET_CONTRACT_ADDRESSES, ZERO_ADDRESS, gatekeeperOneTestnetWallet, gatekeeperTwoTestnetWallet, testNetworkName, testNetworkNameWithErc20Fees, testNetworkNameWithNativeFees } from "../utils";
import { BNB_TESTNET_CONTRACT_ADDRESSES, COMPLERE_TESTNET_CONTRACT_ADDRESSES, ZERO_ADDRESS, gatekeeperOneTestnetWallet, gatekeeperTwoTestnetWallet, testNetworkName, testNetworkNameWithErc20Fees, testNetworkNameWithNativeFees } from "../utils";
import { GatewayNetwork, IGatewayNetwork } from "../../typechain-types";
import { utils } from "ethers";

async function main() {
let signer: Signer;
signer = await getDeploymentSigner();

const gatewayNetworkContractAddress = COMPLERE_TESTNET_CONTRACT_ADDRESSES.gatewayNetwork;
const dummyERC20ContractAddress = COMPLERE_TESTNET_CONTRACT_ADDRESSES.erc20;
const gatewayNetworkContractAddress = BNB_TESTNET_CONTRACT_ADDRESSES.gatewayNetwork;
const dummyERC20ContractAddress = BNB_TESTNET_CONTRACT_ADDRESSES.erc20;

const provider = new ethers.providers.JsonRpcProvider(process.env.BNB_TESTNET_RPC_URL!);

Expand Down
Loading