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

Feat/wallet integration #49

Merged
merged 18 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5030da1
Remove Login component and update dependencies
truemiller Apr 2, 2024
d82d2be
Merge remote-tracking branch 'origin/feat/wallet' into feat/wallet-in…
truemiller Apr 3, 2024
493bba8
updates
truemiller Apr 3, 2024
cd74baf
Add serviceAddresses to ServicesContext
truemiller Apr 4, 2024
1d5952f
Merge remote-tracking branch 'origin/feat/wallet' into feat/wallet-in…
truemiller Apr 4, 2024
c520214
Update Gitignore and environment variables
truemiller Apr 4, 2024
f451db1
Fix typo in createEOA function
truemiller Apr 4, 2024
f7679c2
Update frontend/service/Services.ts
truemiller Apr 4, 2024
5ad0e3c
Update loginAccount function to handle additional HTTP status codes
truemiller Apr 4, 2024
49da4a3
Merge branch 'feat/wallet-integration' of github.com:valory-xyz/olas-…
truemiller Apr 4, 2024
5ffc1b7
Add truncateAddress function and update Receive component
truemiller Apr 4, 2024
ea3190c
Add AccountIsSetup enum and update Setup component
truemiller Apr 4, 2024
add3eaf
Refactor Setup.tsx to improve code readability and maintainability
truemiller Apr 4, 2024
9d2acd1
Fix error handling in SetupPassword component
truemiller Apr 4, 2024
449236e
Refactor serviceAddresses initialization and updateBalance function
truemiller Apr 4, 2024
327db37
Refactor balance check in Main component
truemiller Apr 4, 2024
4011971
Fix missing dependency in Setup component and add check for RPC conne…
truemiller Apr 4, 2024
c5ee802
Fix wallet and service address validation in WalletProvider
truemiller Apr 5, 2024
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: 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
Tanya-atatakai marked this conversation as resolved.
Show resolved Hide resolved
onClick={handleClick}
style={{
marginTop: 'auto',
Expand Down
Loading
Loading