Skip to content

Commit

Permalink
Merge branch 'develop' into tooling-epic/dashboard-styling
Browse files Browse the repository at this point in the history
  • Loading branch information
evavirseda authored Nov 20, 2024
2 parents bacfda4 + c11685e commit 7264fb0
Show file tree
Hide file tree
Showing 61 changed files with 534 additions and 391 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/_turborepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,12 @@ jobs:
key: turbo-${{ runner.os }}-${{ github.sha }}
restore-keys: |
turbo-${{ runner.os }}-
- name: (debug) Install `tree`
run: sudo apt install tree -y
- name: (debug-before) Check SDK dist folder
continue-on-error: true
run: tree ./sdk/typescript/dist
- name: Lint
run: pnpm turbo lint
- name: Install wasm-pack for mbf package
uses: jetli/wasm-pack-action@0d096b08b4e5a7de8c28de67e11e945404e9eefa # [email protected]
with:
version: "latest"
- name: (debug) Build
continue-on-error: true
run: pnpm turbo build
- name: (debug-after) Check SDK dist folder
continue-on-error: true
run: tree ./sdk/typescript/dist
- name: Build
run: pnpm turbo build
- name: Test
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,6 @@ jobs:
macos-latest, # macos-arm64
]
steps:
# TODO: Remove when iota-sim is public https://github.com/iotaledger/iota/issues/2149
- name: Set up SSH (MacOs only)
if: ${{ matrix.os == 'macos-latest' }}
uses: MrSquaare/ssh-setup-action@2d028b70b5e397cf8314c6eaea229a6c3e34977a # pin@v3
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY_IOTA_CI }}
private-key-name: github-ppk

- name: Install postgres (MacOS arm64)
if: ${{ matrix.os == 'macos-latest' }}
shell: bash
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,6 @@ jobs:
sudo rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/*
df -h /
# TODO: Remove when iota-sim is public https://github.com/iotaledger/iota/issues/2149
- name: Set up SSH (MacOs only)
if: ${{ matrix.os == 'macos-latest' }}
uses: MrSquaare/ssh-setup-action@2d028b70b5e397cf8314c6eaea229a6c3e34977a # pin@v3
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY_IOTA_CI }}
private-key-name: github-ppk

- name: Cargo build for ${{ matrix.os }} platform
shell: bash
# Currently building in release mode, but we could also have debug builds for testing
Expand Down
44 changes: 4 additions & 40 deletions .github/workflows/release_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
id: meta-node
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # pin@v5
with:
images: docker-registry.iota.org/iota-node
images: iotaledger/iota-node
# mapping semver tags to networks
# v{MAJOR}.{MINOR}.{PATCH}-alpha -> alphanet
# v{MAJOR}.{MINOR}.{PATCH}-beta -> devnet
Expand All @@ -67,14 +67,6 @@ jobs:
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
registry: ${{ secrets.DOCKER_REGISTRY_URL }}

# TODO: Remove when iota-sim is public https://github.com/iotaledger/iota/issues/2149
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@2d028b70b5e397cf8314c6eaea229a6c3e34977a # pin@v3
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY_IOTA_CI }}
private-key-name: github-ppk

- name: Get git revision and build date
id: git-info
run: |
Expand All @@ -84,7 +76,6 @@ jobs:
- name: Build and push Docker image for iota-node
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # pin@v6
with:
ssh: default
context: .
file: docker/iota-node/Dockerfile
platforms: linux/amd64
Expand Down Expand Up @@ -113,7 +104,7 @@ jobs:
id: meta-indexer
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # pin@v5
with:
images: docker-registry.iota.org/iota-indexer
images: iotaledger/iota-indexer
# mapping semver tags to networks
# v{MAJOR}.{MINOR}.{PATCH}-alpha -> alphanet
# v{MAJOR}.{MINOR}.{PATCH}-beta -> devnet
Expand All @@ -135,14 +126,6 @@ jobs:
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
registry: ${{ secrets.DOCKER_REGISTRY_URL }}

# TODO: Remove when iota-sim is public https://github.com/iotaledger/iota/issues/2149
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@2d028b70b5e397cf8314c6eaea229a6c3e34977a # pin@v3
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY_IOTA_CI }}
private-key-name: github-ppk

- name: Get git revision and build date
id: git-info
run: |
Expand All @@ -152,7 +135,6 @@ jobs:
- name: Build and push Docker image for iota-indexer
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # pin@v6
with:
ssh: default
context: .
file: docker/iota-indexer/Dockerfile
platforms: linux/amd64
Expand Down Expand Up @@ -181,7 +163,7 @@ jobs:
id: meta-tools
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # pin@v5
with:
images: docker-registry.iota.org/iota-tools
images: iotaledger/iota-tools
# mapping semver tags to networks
# v{MAJOR}.{MINOR}.{PATCH}-alpha -> alphanet
# v{MAJOR}.{MINOR}.{PATCH}-beta -> devnet
Expand All @@ -203,14 +185,6 @@ jobs:
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
registry: ${{ secrets.DOCKER_REGISTRY_URL }}

# TODO: Remove when iota-sim is public https://github.com/iotaledger/iota/issues/2149
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@2d028b70b5e397cf8314c6eaea229a6c3e34977a # pin@v3
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY_IOTA_CI }}
private-key-name: github-ppk

- name: Get git revision and build date
id: git-info
run: |
Expand All @@ -220,7 +194,6 @@ jobs:
- name: Build and push Docker image for iota-tools
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # pin@v6
with:
ssh: default
context: .
file: docker/iota-tools/Dockerfile
platforms: linux/amd64
Expand Down Expand Up @@ -249,7 +222,7 @@ jobs:
id: meta-tools
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # pin@v5
with:
images: docker-registry.iota.org/iota-graphql-rpc
images: iotaledger/iota-graphql-rpc
# mapping semver tags to networks
# v{MAJOR}.{MINOR}.{PATCH}-alpha -> alphanet
# v{MAJOR}.{MINOR}.{PATCH}-beta -> devnet
Expand All @@ -271,14 +244,6 @@ jobs:
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
registry: ${{ secrets.DOCKER_REGISTRY_URL }}

# TODO: Remove when iota-sim is public https://github.com/iotaledger/iota/issues/2149
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@2d028b70b5e397cf8314c6eaea229a6c3e34977a # pin@v3
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY_IOTA_CI }}
private-key-name: github-ppk

- name: Get git revision and build date
id: git-info
run: |
Expand All @@ -288,7 +253,6 @@ jobs:
- name: Build and push Docker image for iota-graphql-rpc
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # pin@v6
with:
ssh: default
context: .
file: docker/iota-graphql-rpc/Dockerfile
platforms: linux/amd64
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ leb128 = "0.2.5"
lru = "0.12"
mockall = "0.11.4"
more-asserts = "0.3.1"
msim = { git = "ssh://git@github.com/iotaledger/iota-sim.git", rev = "8fe1939f4bf1e54d0638756c82aaa6c29212e2bb", package = "msim" }
msim = { git = "https://github.com/iotaledger/iota-sim.git", rev = "f16ef50ba7d874fe1f0960f248f6c651a634d6a5", package = "msim" }
nonempty = "0.9.0"
notify = "6.1.1"
num-bigint = "0.4.4"
Expand Down Expand Up @@ -409,7 +409,7 @@ iota-rosetta = { path = "crates/iota-rosetta" }
iota-rpc-loadgen = { path = "crates/iota-rpc-loadgen" }
iota-sdk = { path = "crates/iota-sdk" }
# core-types with json format for REST API
iota-sdk2 = { package = "iota-rust-sdk", git = "ssh://git@github.com/iotaledger/iota-rust-sdk.git", rev = "d605da95029e74376f0f39a95526bb1a5c0ebd7a", features = ["hash", "serde", "schemars"] }
iota-sdk2 = { package = "iota-rust-sdk", git = "https://github.com/iotaledger/iota-rust-sdk.git", rev = "d605da95029e74376f0f39a95526bb1a5c0ebd7a", features = ["hash", "serde", "schemars"] }
iota-simulator = { path = "crates/iota-simulator" }
iota-snapshot = { path = "crates/iota-snapshot" }
iota-source-validation = { path = "crates/iota-source-validation" }
Expand Down
3 changes: 2 additions & 1 deletion apps/ui-kit/src/lib/components/atoms/checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
/>
<span
onClick={() => inputRef.current?.click()}
className="peer-enabled:state-layer relative inset-0 flex h-5 w-5 items-center justify-center rounded border border-neutral-80 text-neutral-40 group-[.disabled]:cursor-not-allowed peer-disabled:text-neutral-70 peer-disabled:text-opacity-40 peer-disabled:opacity-40 peer-[&:is(:checked,:indeterminate)]:border-primary-30 peer-[&:is(:checked,:indeterminate)]:bg-primary-30 peer-[&:is(:checked,:indeterminate)]:text-white peer-[&:not(:checked,:indeterminate)]:text-opacity-40 disabled:peer-[&:not(:checked,:indeterminate)]:border-neutral-70 dark:border-neutral-20 dark:text-neutral-60 dark:peer-disabled:text-neutral-30 dark:peer-disabled:text-opacity-40 dark:peer-disabled:peer-[&:not(:checked,:indeterminate)]:border-neutral-30 dark:peer-disabled:peer-[&:is(:checked,:indeterminate)]:bg-neutral-40 peer-disabled:[&:is(:checked,:indeterminate)]:border-neutral-60 peer-disabled:[&:is(:checked,:indeterminate)]:bg-neutral-60 dark:peer-disabled:[&:is(:checked,:indeterminate)]:border-neutral-40 [&_svg]:h-4 [&_svg]:w-4"
className="peer-enabled:state-layer relative inset-0 flex h-5 w-5 items-center justify-center rounded border border-neutral-80 text-neutral-40 group-[.disabled]:cursor-not-allowed peer-disabled:text-neutral-70 peer-disabled:text-opacity-40 peer-disabled:opacity-40 peer-[&:is(:checked,:indeterminate)]:border-primary-30 peer-[&:is(:checked,:indeterminate)]:bg-primary-30 peer-[&:is(:checked,:indeterminate)]:text-white peer-[&:not(:checked,:indeterminate)]:text-opacity-40 disabled:peer-[&:not(:checked,:indeterminate)]:border-neutral-70 dark:border-neutral-20 dark:text-neutral-60 dark:peer-disabled:text-neutral-30 dark:peer-disabled:text-opacity-40 dark:peer-disabled:peer-[&:not(:checked,:indeterminate)]:border-neutral-30 dark:peer-disabled:peer-[&:is(:checked,:indeterminate)]:bg-neutral-40 peer-disabled:[&:is(:checked,:indeterminate)]:border-neutral-60 peer-disabled:[&:is(:checked,:indeterminate)]:bg-neutral-60 dark:peer-disabled:[&:is(:checked,:indeterminate)]:border-neutral-40 [&_svg]:h-4 [&_svg]:w-4 peer-[&:not(:checked,:indeterminate)]:[&_svg]:hidden"
>
<CheckmarkIcon />
</span>

<LabelText label={label} name={name} />
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iota-wallet",
"version": "0.3.0",
"version": "0.3.1",
"private": true,
"description": "A wallet for IOTA",
"main": "./dist/ui.js",
Expand Down
5 changes: 3 additions & 2 deletions apps/wallet/src/ui/app/components/transactions-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ export function TransactionCard({ txn, address }: TransactionCardProps) {

const error = txn.effects?.status.error;

const timestamp = txn.timestampMs;
const transactionDate = formatDate(Number(timestamp), ['month', 'day', 'hour', 'minute']);
const transactionDate = !txn.timestampMs
? '--'
: formatDate(Number(txn.timestampMs), ['month', 'day', 'hour', 'minute']);

return (
<Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ export function ImportLedgerAccountsPage() {
}

function selectAllAccounts() {
if (ledgerAccounts) {
const areAllAccountsSelected = numSelectedAccounts === numImportableAccounts;
if (ledgerAccounts && !areAllAccountsSelected) {
setSelectedLedgerAccounts(new Set(ledgerAccounts.map((acc) => acc.address)));
} else if (areAllAccountsSelected) {
setSelectedLedgerAccounts(new Set());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function DelegationDetailCard({ validatorAddress, stakedId }: DelegationD
const [iotaEarnedFormatted, iotaEarnedSymbol] = useFormatCoin(iotaEarned, IOTA_TYPE_ARG);
const [totalStakeFormatted, totalStakeSymbol] = useFormatCoin(totalStake, IOTA_TYPE_ARG);

const delegationId = delegationData?.status === 'Active' && delegationData?.stakedIotaId;
const delegationId = delegationData?.stakedIotaId;

const stakeByValidatorAddress = `/stake/new?${new URLSearchParams({
address: validatorAddress,
Expand Down
28 changes: 21 additions & 7 deletions apps/wallet/src/ui/app/staking/stake/StakingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,16 @@ import StakeForm from './StakeForm';
import { UnStakeForm } from './UnstakeForm';
import { createValidationSchema } from './utils/validation';
import { ValidatorFormDetail } from './ValidatorFormDetail';
import { Button, ButtonType, CardType } from '@iota/apps-ui-kit';
import {
Button,
ButtonType,
CardType,
InfoBox,
InfoBoxStyle,
InfoBoxType,
} from '@iota/apps-ui-kit';
import { ValidatorLogo } from '../validators/ValidatorLogo';
import { Loader } from '@iota/ui-icons';
import { Info, Loader } from '@iota/ui-icons';

const INITIAL_VALUES = {
amount: '',
Expand Down Expand Up @@ -94,10 +101,7 @@ function StakingCard() {
);

const queryClient = useQueryClient();
const delegationId =
stakeData?.status === 'Unstaked' || stakeData?.status === 'Active'
? stakeData?.stakedIotaId
: undefined;
const delegationId = stakeData?.stakedIotaId;

const navigate = useNavigate();
const signer = useSigner(activeAccount);
Expand Down Expand Up @@ -191,7 +195,7 @@ function StakingCard() {
let txDigest;
if (unstake) {
// check for delegation data
if (!stakeData || !stakeIotaIdParams || stakeData.status === 'Pending') {
if (!stakeData || !stakeIotaIdParams) {
return;
}
response = await unStakeTokenMutateAsync({
Expand Down Expand Up @@ -306,6 +310,16 @@ function StakingCard() {
/>
)}
</div>
<div className="pt-sm">
{unstake && Number(iotaEarned) == 0 && (
<InfoBox
supportingText="You have not earned any rewards yet"
icon={<Info />}
type={InfoBoxType.Default}
style={InfoBoxStyle.Elevated}
/>
)}
</div>
<div className="pt-sm">
<Button
type={unstake ? ButtonType.Secondary : ButtonType.Primary}
Expand Down
Loading

0 comments on commit 7264fb0

Please sign in to comment.