Skip to content
This repository has been archived by the owner on Feb 10, 2020. It is now read-only.

Commit

Permalink
refactor: throw an error if the vendor is too long (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
kalgoop authored and faustbrian committed Dec 22, 2018
1 parent 4cdb18f commit bd7e039
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ module.exports = class ArkPay extends Emittery {
*/
vendorField (value) {
this.data.transfer.vendorField = value

if (value.length > 64) throw new Error('The given value exceeds the maximum length of 64 characters.')

return this
}
Expand Down

0 comments on commit bd7e039

Please sign in to comment.