Skip to content

Commit

Permalink
SEP-12: remove 'account' param from requests (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeUrban authored Apr 13, 2022
1 parent 20928fe commit e2b7106
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion @stellar/anchor-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stellar/anchor-tests",
"version": "0.3.0",
"version": "0.4.0",
"description": "stellar-anchor-tests is a library and command line interface for testing Stellar anchors.",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down
14 changes: 5 additions & 9 deletions @stellar/anchor-tests/src/tests/sep12/getCustomer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ const newCustomerValidSchema: Test = {
);
if (!token) return result;
const customerType = getCreateCustomerType(config);
const requestParamsObj: Record<string, string> = {
account: clientKeypair.publicKey(),
};
const requestParamsObj: Record<string, string> = {};
if (customerType) requestParamsObj["type"] = customerType;
const searchParams = new URLSearchParams(requestParamsObj);
const getCustomerCall: NetworkCall = {
Expand Down Expand Up @@ -261,8 +259,8 @@ export const canFetchExistingCustomerById: Test = {
};
tests.push(canFetchExistingCustomerById);

const canFetchExistingCustomerByAccount: Test = {
assertion: "can retrieve customer using 'account'",
const canFetchExistingCustomerBySep10Token: Test = {
assertion: "can retrieve customer using SEP-10 token",
sep: 12,
group: getCustomerGroup,
dependencies: [canCreateCustomer],
Expand Down Expand Up @@ -315,9 +313,7 @@ const canFetchExistingCustomerByAccount: Test = {
}
const result: Result = { networkCalls: [] };
const customerType = getCreateCustomerType(config);
const requestParamsObj: Record<string, string> = {
account: this.context.expects.clientKeypair.publicKey(),
};
const requestParamsObj: Record<string, string> = {};
if (customerType) requestParamsObj["type"] = customerType;
const searchParams = new URLSearchParams(requestParamsObj);
const getCustomerCall: NetworkCall = {
Expand Down Expand Up @@ -353,6 +349,6 @@ const canFetchExistingCustomerByAccount: Test = {
return result;
},
};
tests.push(canFetchExistingCustomerByAccount);
tests.push(canFetchExistingCustomerBySep10Token);

export default tests;
3 changes: 0 additions & 3 deletions @stellar/anchor-tests/src/tests/sep12/putCustomer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ export const canCreateCustomer: Test = {
const putCustomerRequest = makeSep12Request({
url: this.context.expects.kycServerUrl + "/customer",
data: {
account: this.context.expects.clientKeypair.publicKey(),
...customerValues,
},
headers: {
Expand Down Expand Up @@ -295,7 +294,6 @@ export const differentMemosSameAccount: Test = {
const sep12Request = makeSep12Request({
url: this.context.expects.kycServerUrl + "/customer",
data: {
account: this.context.provides.sendingAnchorClientKeypair.publicKey(),
memo: this.context.provides.sendingCustomerMemo.value.toString(
"base64",
),
Expand Down Expand Up @@ -327,7 +325,6 @@ export const differentMemosSameAccount: Test = {
const receivingCustomerRequest = makeSep12Request({
url: this.context.expects.kycServerUrl + "/customer",
data: {
account: this.context.provides.sendingAnchorClientKeypair.publicKey(),
memo: this.context.provides.receivingCustomerMemo.value.toString(
"base64",
),
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ This changelog documents all releases and included changes to the @stellar/ancho

A breaking change will get clearly marked in this log.

## [v0.4.0](https://github.com/stellar/stellar-anchor-tests/compare/v0.3.0...v0.4.0)

### Update

- SEP-12 tests no longer include the `account` request parameter since it has been deprecated. ([#82](https://github.com/stellar/stellar-anchor-tests/pull/82))

## [v0.3.0](https://github.com/stellar/stellar-anchor-tests/compare/v0.2.0...v0.3.0)

### Update
Expand Down

0 comments on commit e2b7106

Please sign in to comment.