-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
krzysztofwedrowicz
committed
Jun 26, 2019
1 parent
ca7410c
commit fd503b0
Showing
57 changed files
with
978 additions
and
1,490 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 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 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 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 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 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 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 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 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as chai from 'chai'; | ||
import * as chaiAsPromised from 'chai-as-promised'; | ||
|
||
chai.use(chaiAsPromised); | ||
|
||
export const { expect } = chai; |
This file contains 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 |
---|---|---|
@@ -1,7 +1,3 @@ | ||
class BlockchainPort { | ||
getBlockNumber() { | ||
throw new Error('Not implemented'); | ||
} | ||
export default interface BlockchainPort { | ||
getBlockNumber(): Promise<number>; | ||
} | ||
|
||
export default BlockchainPort; |
This file contains 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 |
---|---|---|
@@ -1,13 +1,6 @@ | ||
/* eslint-disable no-unused-vars */ | ||
import Request from '@core/domain/request/Request'; | ||
|
||
class OracleGateway { | ||
getRequests(fromBlock, toBlock) { | ||
throw new Error('Not implemented'); | ||
} | ||
|
||
sendResponse(response) { | ||
throw new Error('Not implemented'); | ||
} | ||
export default interface OracleGateway { | ||
getRequests(fromBlock, toBlock): Promise<Request[]>; | ||
sendResponse(response): Promise<void>; | ||
} | ||
|
||
export default OracleGateway; |
This file contains 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
18 changes: 11 additions & 7 deletions
18
src/domain/blockchain/usecase/FetchNewOracleRequestsUseCase.ts
This file contains 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 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
15 changes: 8 additions & 7 deletions
15
src/domain/blockchain/usecase/SendResponseToOracleUseCase.ts
This file contains 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 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 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 |
---|---|---|
@@ -1,13 +1,4 @@ | ||
/* eslint-disable no-unused-vars */ | ||
|
||
class DataSelectorPort { | ||
select(data, path) { | ||
throw new Error('Not implemented'); | ||
} | ||
|
||
canHandle(contentType) { | ||
throw new Error('Not implemented'); | ||
} | ||
export default interface DataSelectorPort { | ||
select(data, path): string; | ||
canHandle(contentType): boolean; | ||
} | ||
|
||
export default DataSelectorPort; |
This file contains 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 |
---|---|---|
@@ -1,13 +1,4 @@ | ||
/* eslint-disable no-unused-vars */ | ||
|
||
class LoggerPort { | ||
info(message) { | ||
throw new Error('Not implemented'); | ||
} | ||
|
||
error(message, error) { | ||
throw new Error('Not implemented'); | ||
} | ||
export default interface LoggerPort { | ||
info(message): void; | ||
error(message, error): void; | ||
} | ||
|
||
export default LoggerPort; |
This file contains 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 |
---|---|---|
@@ -1,9 +1,3 @@ | ||
/* eslint-disable no-unused-vars */ | ||
|
||
class UrlDataFetcherPort { | ||
fetch(url) { | ||
throw new Error('Not implemented'); | ||
} | ||
export default interface UrlDataFetcherPort { | ||
fetch(url: string): Promise<string>; | ||
} | ||
|
||
export default UrlDataFetcherPort; |
Oops, something went wrong.