This repository was archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 115
Addressed inconsistencies in the Typescript bindings in the browser #697
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d0a0eaf
Corrected type of the `isRemoved` field to `boolean` in `ContractEven…
jalextowle 037f33e
Corrected field name of the `orderSenderAddress` field in the `Exchan…
jalextowle 6a82cfd
Updated fields of `ExchangeFillEvent` to comply with the V3 contracts
jalextowle b8767ad
Corrected use of timestamps in ts bindings
jalextowle 7c329b4
updated changelog
jalextowle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -271,13 +271,13 @@ export interface OrderInfo { | |
|
|
||
| interface WrapperGetOrdersResponse { | ||
| snapshotID: string; | ||
| snapshotTimestamp: number; | ||
| snapshotTimestamp: string; | ||
| ordersInfos: WrapperOrderInfo[]; | ||
| } | ||
|
|
||
| export interface GetOrdersResponse { | ||
| snapshotID: string; | ||
| snapshotTimestamp: number; | ||
| snapshotTimestamp: Date; | ||
| ordersInfos: OrderInfo[]; | ||
| } | ||
|
|
||
|
|
@@ -450,9 +450,12 @@ export interface ExchangeFillEvent { | |
| takerAssetFilledAmount: BigNumber; | ||
| makerFeePaid: BigNumber; | ||
| takerFeePaid: BigNumber; | ||
| protocolFeePaid: BigNumber; | ||
| orderHash: string; | ||
| makerAssetData: string; | ||
| takerAssetData: string; | ||
| makerFeeAssetData: string; | ||
| takerFeeAssetData: string; | ||
| } | ||
|
|
||
| interface WrapperExchangeFillEvent { | ||
|
|
@@ -464,9 +467,12 @@ interface WrapperExchangeFillEvent { | |
| takerAssetFilledAmount: string; | ||
| makerFeePaid: string; | ||
| takerFeePaid: string; | ||
| protocolFeePaid: BigNumber; | ||
| orderHash: string; | ||
| makerAssetData: string; | ||
| takerAssetData: string; | ||
| makerFeeAssetData: string; | ||
| takerFeeAssetData: string; | ||
| } | ||
|
|
||
| export interface ExchangeCancelEvent { | ||
|
|
@@ -480,13 +486,13 @@ export interface ExchangeCancelEvent { | |
|
|
||
| export interface ExchangeCancelUpToEvent { | ||
| makerAddress: string; | ||
| senderAddress: string; | ||
| orderSenderAddress: string; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a breaking change also. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi |
||
| orderEpoch: BigNumber; | ||
| } | ||
|
|
||
| interface WrapperExchangeCancelUpToEvent { | ||
| makerAddress: string; | ||
| senderAddress: string; | ||
| orderSenderAddress: string; | ||
| orderEpoch: string; | ||
| } | ||
|
|
||
|
|
@@ -561,7 +567,7 @@ export interface ContractEvent { | |
| txHash: string; | ||
| txIndex: number; | ||
| logIndex: number; | ||
| isRemoved: string; | ||
| isRemoved: boolean; | ||
| address: string; | ||
| kind: ContractEventKind; | ||
| parameters: ContractEventParameters; | ||
|
|
@@ -573,7 +579,7 @@ interface WrapperContractEvent { | |
| txHash: string; | ||
| txIndex: number; | ||
| logIndex: number; | ||
| isRemoved: string; | ||
| isRemoved: boolean; | ||
| address: string; | ||
| kind: string; | ||
| parameters: WrapperContractEventParameters; | ||
|
|
@@ -1010,9 +1016,12 @@ function wrapperContractEventsToContractEvents(wrapperContractEvents: WrapperCon | |
| takerAssetFilledAmount: new BigNumber(exchangeFillEvent.takerAssetFilledAmount), | ||
| makerFeePaid: new BigNumber(exchangeFillEvent.makerFeePaid), | ||
| takerFeePaid: new BigNumber(exchangeFillEvent.takerFeePaid), | ||
| protocolFeePaid: new BigNumber(exchangeFillEvent.protocolFeePaid), | ||
| orderHash: exchangeFillEvent.orderHash, | ||
| makerAssetData: exchangeFillEvent.makerAssetData, | ||
| takerAssetData: exchangeFillEvent.takerAssetData, | ||
| makerFeeAssetData: exchangeFillEvent.makerFeeAssetData, | ||
| takerFeeAssetData: exchangeFillEvent.takerFeeAssetData, | ||
| }; | ||
| break; | ||
| case ContractEventKind.ExchangeCancelEvent: | ||
|
|
@@ -1022,7 +1031,7 @@ function wrapperContractEventsToContractEvents(wrapperContractEvents: WrapperCon | |
| const exchangeCancelUpToEvent = rawParameters as WrapperExchangeCancelUpToEvent; | ||
| parameters = { | ||
| makerAddress: exchangeCancelUpToEvent.makerAddress, | ||
| senderAddress: exchangeCancelUpToEvent.senderAddress, | ||
| orderSenderAddress: exchangeCancelUpToEvent.orderSenderAddress, | ||
| orderEpoch: new BigNumber(exchangeCancelUpToEvent.orderEpoch), | ||
| }; | ||
| break; | ||
|
|
@@ -1102,6 +1111,7 @@ function wrapperGetOrdersResponseToGetOrdersResponse( | |
| ): GetOrdersResponse { | ||
| return { | ||
| ...wrapperGetOrdersResponse, | ||
| snapshotTimestamp: new Date(wrapperGetOrdersResponse.snapshotTimestamp), | ||
| ordersInfos: wrapperGetOrdersResponse.ordersInfos.map(wrapperOrderInfoToOrderInfo), | ||
| }; | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is technically a breaking change. I'm okay with merging for now but let's update the changelog later before we release 9.0.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0xee3512fbf0f301e14015c8f91ac02beeba256bfd0857457b7a05c2e41d089522