Skip to content

Commit

Permalink
Merge pull request #49 from valory-xyz/feat/wallet-integration
Browse files Browse the repository at this point in the history
Feat/wallet integration
  • Loading branch information
truemiller authored Apr 5, 2024
2 parents a2134a6 + c5ee802 commit ed44c4f
Show file tree
Hide file tree
Showing 34 changed files with 479 additions and 9,592 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ temp/

!operate/data
dist/
electron/.next
electron/.next

cache
7 changes: 2 additions & 5 deletions electron/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const {
setupUbuntu,
OperateCmd,
OperateDirectory,
startDocker
startDocker,
} = require('./install');
const { killProcesses } = require('./processes');
const { isPortAvailable, findAvailablePort } = require('./ports');
Expand Down Expand Up @@ -268,9 +268,6 @@ async function launchNextAppDev() {

ipcMain.on('check', async function (event, argument) {
try {



event.sender.send('response', 'Checking installation');
if (!isDev) {
if (platform === 'darwin') {
Expand All @@ -282,7 +279,7 @@ ipcMain.on('check', async function (event, argument) {
}
}

startDocker(event.sender)
startDocker(event.sender);

if (isDev) {
event.sender.send(
Expand Down
7 changes: 7 additions & 0 deletions frontend/client/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ export enum DeploymentStatus {
STOPPED = 5,
DELETED = 6,
}

export enum AccountIsSetup {
True,
False,
Loading,
Error,
}
13 changes: 13 additions & 0 deletions frontend/client/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,16 @@ export type AppInfo = {
key: Address;
};
};

export type WalletResponse = {
address: Address;
safe_chains: Chain[];
ledger_type: Ledger;
safe: Address;
safe_nonce: number;
};

export type Wallet = WalletResponse & {
ethBalance?: number;
olasBalance?: number;
};
1 change: 1 addition & 0 deletions frontend/common-util/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './copyToClipboard';
export * from './isDev';
export * from './truncate';
4 changes: 4 additions & 0 deletions frontend/common-util/truncate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Address } from '@/types';

export const truncateAddress = (address: Address) =>
`${address?.substring(0, 6)}...${address?.substring(address.length - 4, address.length)}`;
13 changes: 0 additions & 13 deletions frontend/components/Login.tsx

This file was deleted.

1 change: 1 addition & 0 deletions frontend/components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const Settings = () => {
</Flex>
<Button
type="text"
disabled
onClick={handleClick}
style={{
marginTop: 'auto',
Expand Down
Loading

0 comments on commit ed44c4f

Please sign in to comment.