Skip to content

Commit

Permalink
Revert "Merge branch 'staging' into sentry-integration"
Browse files Browse the repository at this point in the history
This reverts commit b9ace74, reversing
changes made to 6d95bf1.
  • Loading branch information
toddkao committed Jan 7, 2025
1 parent b9ace74 commit 5f29aef
Show file tree
Hide file tree
Showing 25 changed files with 63 additions and 274 deletions.
5 changes: 0 additions & 5 deletions .changeset/clean-weeks-cheer.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/good-pans-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@skip-go/widget': patch
---

fix balance loading display state
5 changes: 0 additions & 5 deletions .changeset/popular-donkeys-behave.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/serious-readers-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@skip-go/widget': patch
---

exclude assets programatically
5 changes: 0 additions & 5 deletions .changeset/smooth-zoos-itch.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/thick-cherries-provide.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ Below are detailed explanations of the different fields and their purposes:
* `orderRefundedTx`: The transaction where the user received a refund on the source chain, if applicable.
* `orderTimeoutTx`: The transaction indicating a timeout occurred in the transfer process.


When tracking a Go Fast transfer, you can use the `GoFastTransferInfo` to monitor the progress and status of your asset transfer between chains. For instance, if the state is `GO_FAST_TRANSFER_FILLED`, you know that the transfer was successful and your assets should be available on the destination chain. If the state is `GO_FAST_TRANSFER_TIMEOUT`, you can check the `orderTimeoutTx` for details on the timeout event.

<Info>
Expand Down
46 changes: 0 additions & 46 deletions examples/nextjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,5 @@
# nextjs

## 0.1.32

### Patch Changes

- Updated dependencies [c7d3743]
- @skip-go/widget@3.1.4

## 0.1.31

### Patch Changes

- @skip-go/widget@3.1.3

## 0.1.30

### Patch Changes

- Updated dependencies [40a9229]
- Updated dependencies [ea59c36]
- Updated dependencies [7caf0cb]
- Updated dependencies [2cff22b]
- Updated dependencies [9628165]
- Updated dependencies [afb37b6]
- @skip-go/widget@3.1.2

## 0.1.29

### Patch Changes

- Updated dependencies [bc373bd]
- @skip-go/widget@3.1.1

## 0.1.28

### Patch Changes

- dacf973: fix example default route and client asset search
- Updated dependencies [dacf973]
- Updated dependencies [dacf973]
- Updated dependencies [dacf973]
- Updated dependencies [dacf973]
- Updated dependencies [dacf973]
- Updated dependencies [dacf973]
- Updated dependencies [dacf973]
- @skip-go/widget@3.1.0

## 0.1.27

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nextjs",
"version": "0.1.32",
"version": "0.1.27",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
24 changes: 0 additions & 24 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,5 @@
# @skip-go/client

## 0.16.2

### Patch Changes

- 8a1ae46: no longer override timeout in signCosmosMessageAmino

## 0.16.1

### Patch Changes

- fa9b9c9: add error message field on GoFastTransferInfo
- 9628165: update registries
- afb37b6: fix build

## 0.16.0

### Minor Changes

- dacf973: stargate transfer types

### Patch Changes

- dacf973: update getCosmosSigner type

## 0.15.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@skip-go/client",
"description": "JavaScript SDK for Skip Go API",
"version": "0.16.2",
"version": "0.15.6",
"repository": "https://github.com/skip-mev/skip-go",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
19 changes: 19 additions & 0 deletions packages/client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,25 @@ export class SkipClient {
getEncodeObjectFromCosmosMessage(cosmosMsg)
);

const aminoMsgTransferIndex = messages.findIndex(
(x) => x.typeUrl === '/ibc.applications.transfer.v1.MsgTransfer'
);
if (aminoMsgTransferIndex !== -1) {
const endpoint = await this.getRpcEndpointForChain(chainID);
const client = await StargateClient.connect(endpoint, {
accountParser,
});

const currentHeight = await client.getHeight();

messages[aminoMsgTransferIndex]!.value.timeoutHeight = {
revisionHeight: currentHeight + 100,
revisionNumber: currentHeight + 100,
};

messages[aminoMsgTransferIndex]!.value.timeoutTimestamp = 0;
}

const signMode = SignMode.SIGN_MODE_LEGACY_AMINO_JSON;
const msgs = messages.map((msg) => this.aminoTypes.toAmino(msg));

Expand Down
37 changes: 0 additions & 37 deletions packages/client/src/types/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -878,43 +878,6 @@ export function goFastTransferFromJSON(goFastJSON: GoFastTransferJSON): GoFastTr
destinationDomain: goFastJSON.destination_domain,
};
}

export function stargateTransferFromJSON(stargateTransferJSON: StargateTransferJSON): StargateTransfer {
return {
fromChainID: stargateTransferJSON.from_chain_id,
toChainID: stargateTransferJSON.to_chain_id,
denomIn: stargateTransferJSON.denom_in,
denomOut: stargateTransferJSON.denom_out,
poolAddress: stargateTransferJSON.pool_address,
destinationEndpointID: stargateTransferJSON.destination_endpoint_id,
oftFeeAsset: assetFromJSON(stargateTransferJSON.oft_fee_asset),
oftFeeAmount: stargateTransferJSON.oft_fee_amount,
oftFeeAmountUSD: stargateTransferJSON.oft_fee_amount_usd,
messagingFeeAsset: assetFromJSON(stargateTransferJSON.messaging_fee_asset),
messagingFeeAmount: stargateTransferJSON.messaging_fee_amount,
messagingFeeAmountUSD: stargateTransferJSON.messaging_fee_amount_usd,
bridgeID: stargateTransferJSON.bridge_id,
}
}

export function stargateTransferToJSON(stargateTransfer: StargateTransfer): StargateTransferJSON {
return {
from_chain_id: stargateTransfer.fromChainID,
to_chain_id: stargateTransfer.toChainID,
denom_in: stargateTransfer.denomIn,
denom_out: stargateTransfer.denomOut,
pool_address: stargateTransfer.poolAddress,
destination_endpoint_id: stargateTransfer.destinationEndpointID,
oft_fee_asset: assetToJSON(stargateTransfer.oftFeeAsset),
oft_fee_amount: stargateTransfer.oftFeeAmount,
oft_fee_amount_usd: stargateTransfer.oftFeeAmountUSD,
messaging_fee_asset: assetToJSON(stargateTransfer.messagingFeeAsset),
messaging_fee_amount: stargateTransfer.messagingFeeAmount,
messaging_fee_amount_usd: stargateTransfer.messagingFeeAmountUSD,
bridge_id: stargateTransfer.bridgeID,
}
}

export function operationFromJSON(operationJSON: OperationJSON): Operation {
const commonProps = {
txIndex: operationJSON.tx_index,
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/types/lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,4 +515,4 @@ export interface TransactionCallbacks {
allowance?: ERC20Approval,
status: CallbackStatus
}) => Promise<void>;
}
}
40 changes: 0 additions & 40 deletions packages/client/src/types/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,46 +198,6 @@ export type GoFastTransferJSON = {
destination_domain: string;
}

export type StargateTransferJSON = {
from_chain_id: string;
to_chain_id: string;
denom_in: string;
denom_out: string;

pool_address: string;
destination_endpoint_id: number;

oft_fee_asset: AssetJSON;
oft_fee_amount: string;
oft_fee_amount_usd: string;

messaging_fee_asset: AssetJSON;
messaging_fee_amount: string;
messaging_fee_amount_usd: string;

bridge_id: BridgeType;
};

export type StargateTransfer = {
fromChainID: string;
toChainID: string;
denomIn: string;
denomOut: string;

poolAddress: string;
destinationEndpointID: number;

oftFeeAsset: Asset;
oftFeeAmount: string;
oftFeeAmountUSD: string;

messagingFeeAsset: Asset;
messagingFeeAmount: string;
messagingFeeAmountUSD: string;

bridgeID: BridgeType;
};

export type BankSendJSON = {
chain_id: string;
denom: string;
Expand Down
52 changes: 0 additions & 52 deletions packages/widget/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,5 @@
## 0.0.15

## 3.1.4

### Patch Changes

- c7d3743: fix edit desintation address

## 3.1.3

### Patch Changes

- Updated dependencies [8a1ae46]
- @skip-go/client@0.16.2

## 3.1.2

### Patch Changes

- 40a9229: show warning if ends in ibc transfer
- ea59c36: Update post tx button to Go again
- 7caf0cb: filter cosmos wallets for is available items
- 2cff22b: remove evm wallet connect
- 9628165: update registries
- afb37b6: fix build
- Updated dependencies [fa9b9c9]
- Updated dependencies [9628165]
- Updated dependencies [afb37b6]
- @skip-go/client@0.16.1

## 3.1.1

### Patch Changes

- bc373bd: fix keplr in app browser issue

## 3.1.0

### Minor Changes

- dacf973: evm mobile wallet support

### Patch Changes

- dacf973: ability to pass signer and account
- dacf973: fix balance loading display state
- dacf973: fix loading indicator
- dacf973: Add callback functions for wallet connect/disconnect and transaction broadcasted / completed / failed
- dacf973: exclude assets programatically
- dacf973: add daodao iframe wallet
- Updated dependencies [dacf973]
- Updated dependencies [dacf973]
- @skip-go/client@0.16.0

## 3.0.25

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/widget/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@skip-go/widget",
"description": "Swap widget",
"version": "3.1.4",
"version": "3.0.25",
"repository": {
"url": "https://github.com/skip-mev/skip-go",
"directory": "packages/widget"
Expand Down
38 changes: 7 additions & 31 deletions packages/widget/src/components/RenderWalletList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ export const RenderWalletList = ({
const theme = useTheme();
const setChainAddresses = useSetAtom(chainAddressesAtom);

const displayWallets = useMemo(() => {
const filteredWallets = walletList.filter(
(wallet) => isManualWalletEntry(wallet) || wallet?.isAvailable !== false
);

return filteredWallets.length === 1 ? walletList : filteredWallets;
}, [walletList]);

const clearAssetInputAmounts = useSetAtom(clearAssetInputAmountsAtom);

const connectMutation = useMutation({
Expand Down Expand Up @@ -114,25 +106,10 @@ export const RenderWalletList = ({

const renderItem = useCallback(
(wallet: ManualWalletEntry | MinimalWallet) => {
const name = isMinimalWallet(wallet)
? wallet.walletPrettyName ?? wallet.walletName
: wallet.walletName;

const imageUrl = isMinimalWallet(wallet) ? wallet?.walletInfo?.logo : undefined;
const rightContent = isManualWalletEntry(wallet) ? wallet?.rightContent : undefined;
const isAvailable = isMinimalWallet(wallet) ? wallet?.isAvailable : undefined;

const renderedRightContent = rightContent?.() ?? <></>;

const imageElement = imageUrl ? (
<img
height={35}
width={35}
style={{ objectFit: "cover" }}
src={imageUrl}
alt={`${name}-logo`}
/>
) : null;
const name = isMinimalWallet(wallet) ? wallet.walletPrettyName ?? wallet.walletName : wallet.walletName;
const imageUrl = isMinimalWallet(wallet) ? wallet.walletInfo.logo : undefined;
const rightContent = isManualWalletEntry(wallet) ? wallet.rightContent : undefined;
const isAvailable = isMinimalWallet(wallet) ? wallet.isAvailable : undefined;

const onClickConnectWallet = () => {
if (isMinimalWallet(wallet)) {
Expand Down Expand Up @@ -198,9 +175,8 @@ export const RenderWalletList = ({
);

const height = useMemo(() => {
return Math.min(530, displayWallets.length * (ITEM_HEIGHT + ITEM_GAP));
}, [displayWallets.length]);

return Math.min(530, walletList.length * (ITEM_HEIGHT + ITEM_GAP));
}, [walletList]);

const renderWalletListOrWalletConnectionStatus = useMemo(() => {
if (connectMutation.isError || connectMutation.isPending) {
Expand Down Expand Up @@ -262,7 +238,7 @@ export const RenderWalletList = ({
renderItem,
theme.primary.text.lowContrast,
theme.primary.text.normal,
displayWallets,
walletList,
]);

return (
Expand Down
Loading

0 comments on commit 5f29aef

Please sign in to comment.