-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1039 from golemfactory/feature/golem-stats-improv…
…ements Feature/golem stats improvements
- Loading branch information
Showing
4 changed files
with
121 additions
and
5 deletions.
There are no files selected for viewing
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,3 +1,3 @@ | ||
export * from "./types"; | ||
export * from "./scan-director"; | ||
export * from "./scanned-proposal"; | ||
export * from "./scanned-offer"; |
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,22 @@ | ||
import { ScannedOffer } from "./scanned-offer"; | ||
|
||
describe("Scanned Offer", () => { | ||
test("Returns payment platform address information", async () => { | ||
const offer = new ScannedOffer({ | ||
offerId: "example-id", | ||
properties: { | ||
"golem.com.payment.platform.erc20-polygon-glm.address": "0xPolygonAddress", | ||
"golem.com.payment.platform.erc20-holesky-tglm.address": "0xHoleskyAddress", | ||
"golem.com.payment.platform.nonsense": "0xNonsense", | ||
"some.other.prop": "with-a-value", | ||
}, | ||
timestamp: new Date().toISOString(), | ||
providerId: "provider-id", | ||
constraints: "", | ||
}); | ||
|
||
expect(offer.paymentPlatformAddresses["erc20-polygon-glm"]).toEqual("0xPolygonAddress"); | ||
expect(offer.paymentPlatformAddresses["erc20-holesky-tglm"]).toEqual("0xHoleskyAddress"); | ||
expect(Object.entries(offer.paymentPlatformAddresses).length).toEqual(2); | ||
}); | ||
}); |
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